

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>Molecular Dynamics &mdash; quippy 7ea04c5+ documentation</title>
  

  
  
    <link rel="shortcut icon" href="_static/favicon.ico"/>
  
  
  

  
  <script type="text/javascript" src="_static/js/modernizr.min.js"></script>
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
        <script type="text/javascript" src="_static/jquery.js"></script>
        <script type="text/javascript" src="_static/underscore.js"></script>
        <script type="text/javascript" src="_static/doctools.js"></script>
        <script type="text/javascript" src="_static/language_data.js"></script>
        <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"processClass": "math|output_area", "processEscapes": true, "ignoreClass": "document", "inlineMath": [["$", "$"], ["\\(", "\\)"]]}})</script>
    
    <script type="text/javascript" src="_static/js/theme.js"></script>

    

  
  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="_static/theme_overrides.css" type="text/css" />
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="prev" title="Some utilities for topological analysis" href="topology.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="index.html" class="icon icon-home"> quippy
          

          
            
            <img src="_static/hybrid.png" class="logo" alt="Logo"/>
          
          </a>

          
            
            
              <div class="version">
                7ea04c5+
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
    
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction to <code class="docutils literal notranslate"><span class="pre">quippy</span></code></a></li>
<li class="toctree-l1"><a class="reference internal" href="install.html">Installation of QUIP and quippy</a></li>
<li class="toctree-l1"><a class="reference internal" href="Tutorials/index.html">Tutorials</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="quippy.html">Quippy library reference</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="quippy.html#core-functionality">Core functionality</a></li>
<li class="toctree-l2"><a class="reference internal" href="quippy.html#structure-generation-manipulation-and-analysis">Structure generation, manipulation and analysis</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="quippy.html#molecular-dynamics">Molecular Dynamics</a><ul class="current">
<li class="toctree-l3 current"><a class="current reference internal" href="#">Molecular Dynamics</a><ul class="simple">
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="lotf.html"><cite>Learn on the Fly</cite> embedding scheme</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="quippy.html#additional-tools-for-potentials">Additional tools for Potentials</a></li>
<li class="toctree-l2"><a class="reference internal" href="quippy.html#mathematical-and-optimisation-tools">Mathematical and optimisation tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="quippy.html#units-data-and-constants">Units, Data and Constants</a></li>
<li class="toctree-l2"><a class="reference internal" href="quippy.html#low-level-routines-and-datatypes">Low level routines and datatypes</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="visualisation.html">Visualisation Tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="fortran_wrapper.html">Appendix: wrapping Fortran 90 Code</a></li>
<li class="toctree-l1"><a class="reference internal" href="teach_sparse.html">Command line options of the teach_sparse main program</a></li>
</ul>

            
          
    <p></p>
    <ul>
        <li><a href="genindex.html">Index</a></li>
        <li><a href="py-modindex.html">Module Index</a></li>
        <li><a href="search.html">Search Page</a></li>
        <li><a href="_modules/index.html">Module Source Code</a></li>
    </ul>
  
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">quippy</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="index.html">Docs</a> &raquo;</li>
        
          <li><a href="quippy.html">Quippy library reference</a> &raquo;</li>
        
      <li>Molecular Dynamics</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/dynamicalsystem.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  
<style>
/* CSS overrides for sphinx_rtd_theme */

/* 24px margin */
.nbinput.nblast,
.nboutput.nblast {
    margin-bottom: 19px;  /* padding has already 5px */
}

/* ... except between code cells! */
.nblast + .nbinput {
    margin-top: -19px;
}

.admonition > p:before {
    margin-right: 4px;  /* make room for the exclamation icon */
}

/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
.math {
    text-align: unset;
}
</style>
<div class="section" id="module-quippy.dynamicalsystem">
<span id="molecular-dynamics"></span><h1>Molecular Dynamics<a class="headerlink" href="#module-quippy.dynamicalsystem" title="Permalink to this headline">¶</a></h1>
<p>A DynamicalSystem object contains an Atoms object, which holds infomation about
velocities and accelerations of each atom, scalar quantities such as
thermostat settings, and logical masks so that thermostatting can be applied
to selected atoms etc.</p>
<p>In Fortran code, initialise a DynamicalSystem object like this:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">call</span> <span class="n">initialise</span><span class="p">(</span><span class="n">MyDS</span><span class="p">,</span> <span class="n">MyAtoms</span><span class="p">)</span>
</pre></div>
</div>
<p>which (shallowly) copies MyAtoms into the internal atoms structure (and so
MyAtoms is not required by MyDS after this call and can be finalised). In Python,
a DynamicalSystem can be initialised from an Atoms instance:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">MyDS</span> <span class="o">=</span> <span class="n">DynamicalSystem</span><span class="p">(</span><span class="n">MyAtoms</span><span class="p">)</span>
</pre></div>
</div>
<p>A DynamicalSystem is constructed from an Atoms object
<code class="docutils literal notranslate"><span class="pre">atoms</span></code>. The initial velocities and accelerations can optionally be
specificed as <code class="docutils literal notranslate"><span class="pre">(3,atoms.n)</span></code> arrays. The <code class="docutils literal notranslate"><span class="pre">constraints</span></code> and
<code class="docutils literal notranslate"><span class="pre">rigidbodies</span></code> arguments can be used to specify the number of
constraints and rigid bodies respectively (the default is zero in
both cases).</p>
<p>DynamicalSystem has an integrator,</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">call</span> <span class="n">advance_verlet</span><span class="p">(</span><span class="n">MyDS</span><span class="p">,</span><span class="n">dt</span><span class="p">,</span><span class="n">forces</span><span class="p">)</span>
</pre></div>
</div>
<p>which takes a set of forces and integrates the equations of motion forward
for a time <code class="docutils literal notranslate"><span class="pre">dt</span></code>.</p>
<p>All dynamical variables are stored inside the Atoms’ <a class="reference internal" href="atoms.html#quippy.atoms.Atoms.properties" title="quippy.atoms.Atoms.properties"><code class="xref py py-attr docutils literal notranslate"><span class="pre">properties</span></code></a> Dictionary.</p>
<p>Module contents for <a class="reference internal" href="#module-quippy.dynamicalsystem" title="quippy.dynamicalsystem: Run molecular dynamics simulations"><code class="xref py py-mod docutils literal notranslate"><span class="pre">quippy.dynamicalsystem</span></code></a>:</p>
<p class="rubric">Classes</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem" title="quippy.dynamicalsystem.DynamicalSystem"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DynamicalSystem</span></code></a>(…)</td>
<td>Initialise this DynamicalSystem from an Atoms object</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.Dynamics" title="quippy.dynamicalsystem.Dynamics"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Dynamics</span></code></a>(atoms,&nbsp;timestep,&nbsp;trajectory[,&nbsp;…])</td>
<td>Wrapper around <a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem" title="quippy.dynamicalsystem.DynamicalSystem"><code class="xref py py-class docutils literal notranslate"><span class="pre">DynamicalSystem</span></code></a> integrator compatible with ASE <code class="xref py py-class docutils literal notranslate"><span class="pre">ase.md.MolecularDynamics</span></code> interface.</td>
</tr>
</tbody>
</table>
<p class="rubric">Functions</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.gaussian_velocity_component" title="quippy.dynamicalsystem.gaussian_velocity_component"><code class="xref py py-obj docutils literal notranslate"><span class="pre">gaussian_velocity_component</span></code></a>(m,t)</td>
<td>Draw a velocity component from the correct Gaussian distribution for a degree of freedom with (effective) mass <code class="docutils literal notranslate"><span class="pre">m</span></code> at temperature <code class="docutils literal notranslate"><span class="pre">T</span></code></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.torque" title="quippy.dynamicalsystem.torque"><code class="xref py py-obj docutils literal notranslate"><span class="pre">torque</span></code></a>(pos,force,[origin])</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.distance_relative_velocity" title="quippy.dynamicalsystem.distance_relative_velocity"><code class="xref py py-obj docutils literal notranslate"><span class="pre">distance_relative_velocity</span></code></a>(at,i,j)</td>
<td>Return the distance between two atoms and the relative velocity between them projected along the bond direction.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.angular_momentum" title="quippy.dynamicalsystem.angular_momentum"><code class="xref py py-obj docutils literal notranslate"><span class="pre">angular_momentum</span></code></a>(*args,&nbsp;**kwargs)</td>
<td>Routine is wrapper around Fortran interface <code class="docutils literal notranslate"><span class="pre">angular_momentum</span></code> containing multiple routines:</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.kinetic_virial" title="quippy.dynamicalsystem.kinetic_virial"><code class="xref py py-obj docutils literal notranslate"><span class="pre">kinetic_virial</span></code></a>(*args,&nbsp;**kwargs)</td>
<td>Routine is wrapper around Fortran interface <code class="docutils literal notranslate"><span class="pre">kinetic_virial</span></code> containing multiple routines:</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.momentum" title="quippy.dynamicalsystem.momentum"><code class="xref py py-obj docutils literal notranslate"><span class="pre">momentum</span></code></a>(*args,&nbsp;**kwargs)</td>
<td>Routine is wrapper around Fortran interface <code class="docutils literal notranslate"><span class="pre">momentum</span></code> containing multiple routines:</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.kinetic_energy" title="quippy.dynamicalsystem.kinetic_energy"><code class="xref py py-obj docutils literal notranslate"><span class="pre">kinetic_energy</span></code></a>(*args,&nbsp;**kwargs)</td>
<td>Routine is wrapper around Fortran interface <code class="docutils literal notranslate"><span class="pre">kinetic_energy</span></code> containing multiple routines:</td>
</tr>
</tbody>
</table>
<p class="rubric">Attributes</p>
<table border="1" class="docutils">
<colgroup>
<col width="72%" />
<col width="28%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Name</th>
<th class="head">Value</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="xref py py-attr docutils literal notranslate"><span class="pre">TYPE_ATOM</span></code></td>
<td>1</td>
</tr>
<tr class="row-odd"><td><code class="xref py py-attr docutils literal notranslate"><span class="pre">TYPE_IGNORE</span></code></td>
<td>0</td>
</tr>
<tr class="row-even"><td><code class="xref py py-attr docutils literal notranslate"><span class="pre">TYPE_RIGID</span></code></td>
<td>3</td>
</tr>
<tr class="row-odd"><td><code class="xref py py-attr docutils literal notranslate"><span class="pre">TYPE_CONSTRAINED</span></code></td>
<td>2</td>
</tr>
<tr class="row-even"><td><code class="xref py py-attr docutils literal notranslate"><span class="pre">fs</span></code></td>
<td>0.0982269478846</td>
</tr>
<tr class="row-odd"><td><code class="xref py py-attr docutils literal notranslate"><span class="pre">THERMOSTAT_LANGEVIN_PR</span></code></td>
<td>5</td>
</tr>
<tr class="row-even"><td><code class="xref py py-attr docutils literal notranslate"><span class="pre">THERMOSTAT_NOSE_HOOVER</span></code></td>
<td>2</td>
</tr>
<tr class="row-odd"><td><code class="xref py py-attr docutils literal notranslate"><span class="pre">THERMOSTAT_LANGEVIN_OU</span></code></td>
<td>8</td>
</tr>
<tr class="row-even"><td><code class="xref py py-attr docutils literal notranslate"><span class="pre">THERMOSTAT_LANGEVIN_NPT</span></code></td>
<td>4</td>
</tr>
<tr class="row-odd"><td><code class="xref py py-attr docutils literal notranslate"><span class="pre">THERMOSTAT_NONE</span></code></td>
<td>0</td>
</tr>
<tr class="row-even"><td><code class="xref py py-attr docutils literal notranslate"><span class="pre">THERMOSTAT_NPH_PR</span></code></td>
<td>7</td>
</tr>
<tr class="row-odd"><td><code class="xref py py-attr docutils literal notranslate"><span class="pre">THERMOSTAT_ALL_PURPOSE</span></code></td>
<td>10</td>
</tr>
<tr class="row-even"><td><code class="xref py py-attr docutils literal notranslate"><span class="pre">THERMOSTAT_LANGEVIN_NPT_NB</span></code></td>
<td>9</td>
</tr>
<tr class="row-odd"><td><code class="xref py py-attr docutils literal notranslate"><span class="pre">THERMOSTAT_LANGEVIN</span></code></td>
<td>1</td>
</tr>
<tr class="row-even"><td><code class="xref py py-attr docutils literal notranslate"><span class="pre">THERMOSTAT_NPH_ANDERSEN</span></code></td>
<td>6</td>
</tr>
<tr class="row-odd"><td><code class="xref py py-attr docutils literal notranslate"><span class="pre">THERMOSTAT_NOSE_HOOVER_LANGEVIN</span></code></td>
<td>3</td>
</tr>
<tr class="row-even"><td><code class="xref py py-attr docutils literal notranslate"><span class="pre">BAROSTAT_NONE</span></code></td>
<td>0</td>
</tr>
<tr class="row-odd"><td><code class="xref py py-attr docutils literal notranslate"><span class="pre">BAROSTAT_HOOVER_LANGEVIN</span></code></td>
<td>1</td>
</tr>
</tbody>
</table>
<dl class="class">
<dt id="quippy.dynamicalsystem.DynamicalSystem">
<em class="property">class </em><code class="descclassname">quippy.dynamicalsystem.</code><code class="descname">DynamicalSystem</code><span class="sig-paren">(</span><em>atoms_in</em><span class="optional">[</span>, <em>velocity</em>, <em>acceleration</em>, <em>constraints</em>, <em>restraints</em>, <em>rigidbodies</em>, <em>error</em><span class="optional">]</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/dynamicalsystem.html#DynamicalSystem"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">quippy._dynamicalsystem.DynamicalSystem</span></code></p>
<p>Initialise this DynamicalSystem from an Atoms object</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>atoms_in</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
<dt><strong>velocity</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-2 array(‘d’) with bounds (qp_n0,qp_n1), optional</span></dt>
<dd></dd>
<dt><strong>acceleration</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-2 array(‘d’) with bounds (qp_n2,qp_n3), optional</span></dt>
<dd></dd>
<dt><strong>constraints</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>restraints</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>rigidbodies</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>error</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-0 array(int,’i’), optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">__init__initialise</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.
Class is wrapper around Fortran type <code class="docutils literal notranslate"><span class="pre">DynamicalSystem</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Attributes:</th><td class="field-body"><dl class="first last docutils">
<dt><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.avg_temp" title="quippy.dynamicalsystem.DynamicalSystem.avg_temp"><code class="xref py py-obj docutils literal notranslate"><span class="pre">avg_temp</span></code></a></dt>
<dd><p class="first last">Time-averaged temperature</p>
</dd>
<dt><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.avg_time" title="quippy.dynamicalsystem.DynamicalSystem.avg_time"><code class="xref py py-obj docutils literal notranslate"><span class="pre">avg_time</span></code></a></dt>
<dd><p class="first last">Averaging time, in fs</p>
</dd>
<dt><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.cur_temp" title="quippy.dynamicalsystem.DynamicalSystem.cur_temp"><code class="xref py py-obj docutils literal notranslate"><span class="pre">cur_temp</span></code></a></dt>
<dd><p class="first last">Current temperature</p>
</dd>
<dt><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.dt" title="quippy.dynamicalsystem.DynamicalSystem.dt"><code class="xref py py-obj docutils literal notranslate"><span class="pre">dt</span></code></a></dt>
<dd><p class="first last">Last time step</p>
</dd>
<dt><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.dw" title="quippy.dynamicalsystem.DynamicalSystem.dw"><code class="xref py py-obj docutils literal notranslate"><span class="pre">dw</span></code></a></dt>
<dd><p class="first last">Increment of work done this time step</p>
</dd>
<dt><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.ekin" title="quippy.dynamicalsystem.DynamicalSystem.ekin"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ekin</span></code></a></dt>
<dd><p class="first last">Current kinetic energy</p>
</dd>
<dt><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.epot" title="quippy.dynamicalsystem.DynamicalSystem.epot"><code class="xref py py-obj docutils literal notranslate"><span class="pre">epot</span></code></a></dt>
<dd><p class="first last">Total potential energy</p>
</dd>
<dt><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.ext_energy" title="quippy.dynamicalsystem.DynamicalSystem.ext_energy"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ext_energy</span></code></a></dt>
<dd><p class="first last">Extended energy</p>
</dd>
<dt><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.n" title="quippy.dynamicalsystem.DynamicalSystem.n"><code class="xref py py-obj docutils literal notranslate"><span class="pre">n</span></code></a></dt>
<dd><p class="first last">Number of atoms</p>
</dd>
<dt><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.nconstraints" title="quippy.dynamicalsystem.DynamicalSystem.nconstraints"><code class="xref py py-obj docutils literal notranslate"><span class="pre">nconstraints</span></code></a></dt>
<dd><p class="first last">Number of constraints</p>
</dd>
<dt><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.ndof" title="quippy.dynamicalsystem.DynamicalSystem.ndof"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ndof</span></code></a></dt>
<dd><p class="first last">Number of degrees of freedom</p>
</dd>
<dt><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.nrestraints" title="quippy.dynamicalsystem.DynamicalSystem.nrestraints"><code class="xref py py-obj docutils literal notranslate"><span class="pre">nrestraints</span></code></a></dt>
<dd><p class="first last">Number of restraints</p>
</dd>
<dt><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.nrigid" title="quippy.dynamicalsystem.DynamicalSystem.nrigid"><code class="xref py py-obj docutils literal notranslate"><span class="pre">nrigid</span></code></a></dt>
<dd><p class="first last">Number of rigid bodies</p>
</dd>
<dt><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.nsteps" title="quippy.dynamicalsystem.DynamicalSystem.nsteps"><code class="xref py py-obj docutils literal notranslate"><span class="pre">nsteps</span></code></a></dt>
<dd><p class="first last">Number of integration steps</p>
</dd>
<dt><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.random_seed" title="quippy.dynamicalsystem.DynamicalSystem.random_seed"><code class="xref py py-obj docutils literal notranslate"><span class="pre">random_seed</span></code></a></dt>
<dd><p class="first last">RNG seed, used by <code class="docutils literal notranslate"><span class="pre">ds_save_state</span></code> and <code class="docutils literal notranslate"><span class="pre">ds_restore_state</span></code> only.</p>
</dd>
<dt><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.t" title="quippy.dynamicalsystem.DynamicalSystem.t"><code class="xref py py-obj docutils literal notranslate"><span class="pre">t</span></code></a></dt>
<dd><p class="first last">Time</p>
</dd>
<dt><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.thermostat_dw" title="quippy.dynamicalsystem.DynamicalSystem.thermostat_dw"><code class="xref py py-obj docutils literal notranslate"><span class="pre">thermostat_dw</span></code></a></dt>
<dd><p class="first last">Increment of work done by thermostat</p>
</dd>
<dt><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.thermostat_work" title="quippy.dynamicalsystem.DynamicalSystem.thermostat_work"><code class="xref py py-obj docutils literal notranslate"><span class="pre">thermostat_work</span></code></a></dt>
<dd><p class="first last">Total work done by thermostat</p>
</dd>
<dt><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.wkin" title="quippy.dynamicalsystem.DynamicalSystem.wkin"><code class="xref py py-obj docutils literal notranslate"><span class="pre">wkin</span></code></a></dt>
<dd><p class="first last">Current kinetic contribution to the virial</p>
</dd>
<dt><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.work" title="quippy.dynamicalsystem.DynamicalSystem.work"><code class="xref py py-obj docutils literal notranslate"><span class="pre">work</span></code></a></dt>
<dd><p class="first last">Total work done</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Methods</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.add_atoms" title="quippy.dynamicalsystem.DynamicalSystem.add_atoms"><code class="xref py py-obj docutils literal notranslate"><span class="pre">add_atoms</span></code></a>(*args,&nbsp;**kwargs)</td>
<td>Add one or more atoms to this DynamicalSystem.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.add_constraint" title="quippy.dynamicalsystem.DynamicalSystem.add_constraint"><code class="xref py py-obj docutils literal notranslate"><span class="pre">add_constraint</span></code></a>(…)</td>
<td>Add a constraint to the DynamicalSystem and reduce the number of degrees of freedom, unless <code class="docutils literal notranslate"><span class="pre">update_Ndof</span></code> is present and false.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.add_thermostat" title="quippy.dynamicalsystem.DynamicalSystem.add_thermostat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">add_thermostat</span></code></a>(…)</td>
<td>Add a new thermostat to this DynamicalSystem.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.add_thermostats" title="quippy.dynamicalsystem.DynamicalSystem.add_thermostats"><code class="xref py py-obj docutils literal notranslate"><span class="pre">add_thermostats</span></code></a>(…)</td>
<td>ds_add_thermostats(type,n,[t,t_a,gamma,gamma_a,q,q_a,tau,tau_a,region_i])</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.advance_verlet" title="quippy.dynamicalsystem.DynamicalSystem.advance_verlet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">advance_verlet</span></code></a>(…)</td>
<td>Calls`` advance_verlet2`` followed by <code class="docutils literal notranslate"><span class="pre">advance_verlet1</span></code>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.advance_verlet1" title="quippy.dynamicalsystem.DynamicalSystem.advance_verlet1"><code class="xref py py-obj docutils literal notranslate"><span class="pre">advance_verlet1</span></code></a>(…)</td>
<td>Advance the velocities by half the time-step <code class="docutils literal notranslate"><span class="pre">dt</span></code> and the positions by a full time-step.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.advance_verlet2" title="quippy.dynamicalsystem.DynamicalSystem.advance_verlet2"><code class="xref py py-obj docutils literal notranslate"><span class="pre">advance_verlet2</span></code></a>(…)</td>
<td>Advances the velocities by the second half time-step</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.amend_constraint" title="quippy.dynamicalsystem.DynamicalSystem.amend_constraint"><code class="xref py py-obj docutils literal notranslate"><span class="pre">amend_constraint</span></code></a>(constraint,func,data,[k])</td>
<td>Replace a constraint involving some atoms with a different constraint involving the same atoms</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.angular_momentum" title="quippy.dynamicalsystem.DynamicalSystem.angular_momentum"><code class="xref py py-obj docutils literal notranslate"><span class="pre">angular_momentum</span></code></a>([origin,indices])</td>
<td>Return the angular momentum of all the atoms in this DynamicalSystem, defined by <span class="math notranslate nohighlight">\(\mathbf{L} = \sum_{i} \mathbf{r_i} \times \mathbf{v_i}\)</span>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.constrain_atom_plane" title="quippy.dynamicalsystem.DynamicalSystem.constrain_atom_plane"><code class="xref py py-obj docutils literal notranslate"><span class="pre">constrain_atom_plane</span></code></a>(…)</td>
<td>Constrain an atom to lie in a particluar plane</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.constrain_bondanglecos" title="quippy.dynamicalsystem.DynamicalSystem.constrain_bondanglecos"><code class="xref py py-obj docutils literal notranslate"><span class="pre">constrain_bondanglecos</span></code></a>(…)</td>
<td>Constrain the bond angle cosine between atoms i, j, and k</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.constrain_bondlength" title="quippy.dynamicalsystem.DynamicalSystem.constrain_bondlength"><code class="xref py py-obj docutils literal notranslate"><span class="pre">constrain_bondlength</span></code></a>(…)</td>
<td>Constrain the bond between atoms i and j</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.constrain_bondlength_dev_pow" title="quippy.dynamicalsystem.DynamicalSystem.constrain_bondlength_dev_pow"><code class="xref py py-obj docutils literal notranslate"><span class="pre">constrain_bondlength_dev_pow</span></code></a>(…)</td>
<td>Constrain the bond between atoms i and j</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.constrain_bondlength_diff" title="quippy.dynamicalsystem.DynamicalSystem.constrain_bondlength_diff"><code class="xref py py-obj docutils literal notranslate"><span class="pre">constrain_bondlength_diff</span></code></a>(…)</td>
<td>Constrain the difference of bond length between atoms i–j and j–k</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.constrain_bondlength_sq" title="quippy.dynamicalsystem.DynamicalSystem.constrain_bondlength_sq"><code class="xref py py-obj docutils literal notranslate"><span class="pre">constrain_bondlength_sq</span></code></a>(…)</td>
<td>Constrain the bond between atoms i and j</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.constrain_gap_energy" title="quippy.dynamicalsystem.DynamicalSystem.constrain_gap_energy"><code class="xref py py-obj docutils literal notranslate"><span class="pre">constrain_gap_energy</span></code></a>(…)</td>
<td>Constrain the energy gap of two resonance structures</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.constrain_struct_factor_like_i" title="quippy.dynamicalsystem.DynamicalSystem.constrain_struct_factor_like_i"><code class="xref py py-obj docutils literal notranslate"><span class="pre">constrain_struct_factor_like_i</span></code></a>(…)</td>
<td>Constrain an atom to lie in a particluar plane</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.constrain_struct_factor_like_mag" title="quippy.dynamicalsystem.DynamicalSystem.constrain_struct_factor_like_mag"><code class="xref py py-obj docutils literal notranslate"><span class="pre">constrain_struct_factor_like_mag</span></code></a>(…)</td>
<td>Constrain an atom to lie in a particluar plane</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.constrain_struct_factor_like_r" title="quippy.dynamicalsystem.DynamicalSystem.constrain_struct_factor_like_r"><code class="xref py py-obj docutils literal notranslate"><span class="pre">constrain_struct_factor_like_r</span></code></a>(…)</td>
<td>Constrain an atom to lie in a particluar plane</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.disable_damping" title="quippy.dynamicalsystem.DynamicalSystem.disable_damping"><code class="xref py py-obj docutils literal notranslate"><span class="pre">disable_damping</span></code></a>(*args,&nbsp;**kwargs)</td>
<td><p class="rubric">References</p>
</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.enable_damping" title="quippy.dynamicalsystem.DynamicalSystem.enable_damping"><code class="xref py py-obj docutils literal notranslate"><span class="pre">enable_damping</span></code></a>(damp_time)</td>
<td>Enable damping, with damping time set to <cite>damp_time</cite>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.get_damping_time" title="quippy.dynamicalsystem.DynamicalSystem.get_damping_time"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_damping_time</span></code></a>(*args,&nbsp;**kwargs)</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.is_damping_enabled" title="quippy.dynamicalsystem.DynamicalSystem.is_damping_enabled"><code class="xref py py-obj docutils literal notranslate"><span class="pre">is_damping_enabled</span></code></a>(*args,&nbsp;**kwargs)</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-even"><td><code class="xref py py-obj docutils literal notranslate"><span class="pre">is_same_fortran_object</span></code>(other)</td>
<td>Test if <cite>self</cite> and <cite>other</cite> point to the same Fortan object.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.kinetic_energy" title="quippy.dynamicalsystem.DynamicalSystem.kinetic_energy"><code class="xref py py-obj docutils literal notranslate"><span class="pre">kinetic_energy</span></code></a>([mpi_obj,local_ke,error])</td>
<td>Return the total kinetic energy <span class="math notranslate nohighlight">\(E_k = \sum_{i} \frac{1}{2} m v^2\)</span></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.kinetic_virial" title="quippy.dynamicalsystem.DynamicalSystem.kinetic_virial"><code class="xref py py-obj docutils literal notranslate"><span class="pre">kinetic_virial</span></code></a>([mpi_obj,error])</td>
<td>Return the total kinetic virial <span class="math notranslate nohighlight">\(w_ij = \sum_{k} \frac{1}{2} m v_i v_j\)</span></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.momentum" title="quippy.dynamicalsystem.DynamicalSystem.momentum"><code class="xref py py-obj docutils literal notranslate"><span class="pre">momentum</span></code></a>([indices])</td>
<td>Return the total momentum <span class="math notranslate nohighlight">\(\mathbf{p} = \sum_i \mathbf{m_i} \mathbf{v_i}\)</span>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.n_thermostat" title="quippy.dynamicalsystem.DynamicalSystem.n_thermostat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">n_thermostat</span></code></a>(*args,&nbsp;**kwargs)</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.print_" title="quippy.dynamicalsystem.DynamicalSystem.print_"><code class="xref py py-obj docutils literal notranslate"><span class="pre">print_</span></code></a>([file])</td>
<td>Print lots of information about this DynamicalSystem in text format.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.print_status" title="quippy.dynamicalsystem.DynamicalSystem.print_status"><code class="xref py py-obj docutils literal notranslate"><span class="pre">print_status</span></code></a>(…)</td>
<td>Print a status line showing the current time, temperature, the mean temperature the total energy and the total momentum for this DynamicalSystem.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.print_thermostats" title="quippy.dynamicalsystem.DynamicalSystem.print_thermostats"><code class="xref py py-obj docutils literal notranslate"><span class="pre">print_thermostats</span></code></a>(*args,&nbsp;**kwargs)</td>
<td>ds_print_thermostats</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.remove_atoms" title="quippy.dynamicalsystem.DynamicalSystem.remove_atoms"><code class="xref py py-obj docutils literal notranslate"><span class="pre">remove_atoms</span></code></a>(*args,&nbsp;**kwargs)</td>
<td>Remove one or more atoms from this DynamicalSystem.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.remove_thermostat" title="quippy.dynamicalsystem.DynamicalSystem.remove_thermostat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">remove_thermostat</span></code></a>(index)</td>
<td>ds_remove_thermostat(index)</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.rescale_velo" title="quippy.dynamicalsystem.DynamicalSystem.rescale_velo"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rescale_velo</span></code></a>(temp,[mass_weighted,zero_l])</td>
<td>Rescale the atomic velocities to temperature <code class="docutils literal notranslate"><span class="pre">temp</span></code>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.restore_state" title="quippy.dynamicalsystem.DynamicalSystem.restore_state"><code class="xref py py-obj docutils literal notranslate"><span class="pre">restore_state</span></code></a>(to,from)</td>
<td>Restore a DynamicalSystem to a previously saved state.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.run" title="quippy.dynamicalsystem.DynamicalSystem.run"><code class="xref py py-obj docutils literal notranslate"><span class="pre">run</span></code></a>(…)</td>
<td>Run <code class="docutils literal notranslate"><span class="pre">n_steps</span></code> of dynamics using forces from Potential <code class="docutils literal notranslate"><span class="pre">pot</span></code>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.save_state" title="quippy.dynamicalsystem.DynamicalSystem.save_state"><code class="xref py py-obj docutils literal notranslate"><span class="pre">save_state</span></code></a>(to,from,[error])</td>
<td>Save the state of a DynamicalSystem.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.set_barostat" title="quippy.dynamicalsystem.DynamicalSystem.set_barostat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">set_barostat</span></code></a>(…)</td>
<td>ds_set_barostat(type,p_ext,hydrostatic_strain,diagonal_strain,finite_strain_formulation,tau_epsilon,[w_epsilon,t,w_epsilon_factor,thermalise])</td>
</tr>
<tr class="row-odd"><td><code class="xref py py-obj docutils literal notranslate"><span class="pre">shallow_copy</span></code>()</td>
<td>Return a shallow copy of <cite>self</cite>.</td>
</tr>
<tr class="row-even"><td><code class="xref py py-obj docutils literal notranslate"><span class="pre">shallow_copy_from</span></code>(other)</td>
<td>Transform <cite>self</cite> into a shallow copy of <cite>other</cite>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.temperature" title="quippy.dynamicalsystem.DynamicalSystem.temperature"><code class="xref py py-obj docutils literal notranslate"><span class="pre">temperature</span></code></a>(…)</td>
<td>Return the temperature, assuming each degree of freedom contributes <span class="math notranslate nohighlight">\(\frac{1}{2}kT\)</span>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.thermostat_temperatures" title="quippy.dynamicalsystem.DynamicalSystem.thermostat_temperatures"><code class="xref py py-obj docutils literal notranslate"><span class="pre">thermostat_temperatures</span></code></a>(n0)</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.update_thermostat" title="quippy.dynamicalsystem.DynamicalSystem.update_thermostat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">update_thermostat</span></code></a>([t,p,i])</td>
<td>ds_update_thermostat([t,p,i])</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem.zero_momentum" title="quippy.dynamicalsystem.DynamicalSystem.zero_momentum"><code class="xref py py-obj docutils literal notranslate"><span class="pre">zero_momentum</span></code></a>([indices])</td>
<td>Change velocities to those that the system would have in the zero momentum frame.</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.add_atoms">
<code class="descname">add_atoms</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.add_atoms" title="Permalink to this definition">¶</a></dt>
<dd><p>Add one or more atoms to this DynamicalSystem. Equivalent to ‘Atoms%add_atoms’,
but also appends the number of degrees of freedom correctly.</p>
<p>Wrapper around Fortran interface <code class="docutils literal notranslate"><span class="pre">add_atoms</span></code> containing multiple routines:</p>
<blockquote>
<div><dl class="function">
<dt>
<code class="descname">add_atoms</code><span class="sig-paren">(</span><em>z</em><span class="optional">[</span>, <em>mass</em>, <em>p</em>, <em>v</em>, <em>a</em>, <em>t</em>, <em>error</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>z</strong> (<em>input rank-1 array</em><em>(</em><em>'i'</em><em>) </em><em>with bounds</em><em> (</em><em>qp_n0</em><em>)</em>) – </li>
<li><strong>mass</strong> (<em>input rank-1 array</em><em>(</em><em>'d'</em><em>) </em><em>with bounds</em><em> (</em><em>qp_n1</em><em>)</em><em>, </em><em>optional</em>) – </li>
<li><strong>p</strong> (<em>input rank-2 array</em><em>(</em><em>'d'</em><em>) </em><em>with bounds</em><em> (</em><em>qp_n2</em><em>,</em><em>qp_n3</em><em>)</em><em>, </em><em>optional</em>) – </li>
<li><strong>v</strong> (<em>input rank-2 array</em><em>(</em><em>'d'</em><em>) </em><em>with bounds</em><em> (</em><em>qp_n4</em><em>,</em><em>qp_n5</em><em>)</em><em>, </em><em>optional</em>) – </li>
<li><strong>a</strong> (<em>input rank-2 array</em><em>(</em><em>'d'</em><em>) </em><em>with bounds</em><em> (</em><em>qp_n6</em><em>,</em><em>qp_n7</em><em>)</em><em>, </em><em>optional</em>) – </li>
<li><strong>t</strong> (<em>input rank-2 array</em><em>(</em><em>'i'</em><em>) </em><em>with bounds</em><em> (</em><em>qp_n8</em><em>,</em><em>qp_n9</em><em>)</em><em>, </em><em>optional</em>) – </li>
<li><strong>error</strong> (<em>in/output rank-0 array</em><em>(</em><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><em>int</em></a><em>,</em><em>'i'</em><em>)</em><em>, </em><em>optional</em>) – </li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">ds_add_atom_multiple</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt>
<code class="descname">add_atoms</code><span class="sig-paren">(</span><em>z</em><span class="optional">[</span>, <em>mass</em>, <em>p</em>, <em>v</em>, <em>a</em>, <em>t</em>, <em>error</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>z</strong> (<em>input int</em>) – </li>
<li><strong>mass</strong> (<em>input float</em><em>, </em><em>optional</em>) – </li>
<li><strong>p</strong> (<em>input rank-1 array</em><em>(</em><em>'d'</em><em>) </em><em>with bounds</em><em> (</em><em>3</em><em>)</em><em>, </em><em>optional</em>) – </li>
<li><strong>v</strong> (<em>input rank-1 array</em><em>(</em><em>'d'</em><em>) </em><em>with bounds</em><em> (</em><em>3</em><em>)</em><em>, </em><em>optional</em>) – </li>
<li><strong>a</strong> (<em>input rank-1 array</em><em>(</em><em>'d'</em><em>) </em><em>with bounds</em><em> (</em><em>3</em><em>)</em><em>, </em><em>optional</em>) – </li>
<li><strong>t</strong> (<em>input rank-1 array</em><em>(</em><em>'i'</em><em>) </em><em>with bounds</em><em> (</em><em>3</em><em>)</em><em>, </em><em>optional</em>) – </li>
<li><strong>error</strong> (<em>in/output rank-0 array</em><em>(</em><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><em>int</em></a><em>,</em><em>'i'</em><em>)</em><em>, </em><em>optional</em>) – </li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">ds_add_atom_single</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

</div></blockquote>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.add_constraint">
<code class="descname">add_constraint</code><span class="sig-paren">(</span><em>atoms</em>, <em>func</em>, <em>data</em><span class="optional">[</span>, <em>update_ndof</em>, <em>restraint_k</em>, <em>bound</em>, <em>tol</em>, <em>print_summary</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.add_constraint" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a constraint to the DynamicalSystem and reduce the number of degrees of freedom,
unless <code class="docutils literal notranslate"><span class="pre">update_Ndof</span></code> is present and false.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>atoms</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘i’) with bounds (qp_n0)</span></dt>
<dd></dd>
<dt><strong>func</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>data</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘d’) with bounds (qp_n1)</span></dt>
<dd></dd>
<dt><strong>update_ndof</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>restraint_k</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>bound</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>tol</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>print_summary</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">ds_add_constraint</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.add_thermostat">
<code class="descname">add_thermostat</code><span class="sig-paren">(</span><em>type</em>, <em>t</em><span class="optional">[</span>, <em>gamma</em>, <em>q</em>, <em>tau</em>, <em>tau_cell</em>, <em>p</em>, <em>bulk_modulus_estimate</em>, <em>cell_oscillation_time</em>, <em>nhl_tau</em>, <em>nhl_mu</em>, <em>massive</em>, <em>region_i</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.add_thermostat" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a new thermostat to this DynamicalSystem. <code class="docutils literal notranslate"><span class="pre">type</span></code> should
be one of the following thermostat types:</p>
<ul class="simple">
<li><code class="docutils literal notranslate"><span class="pre">THERMOSTAT_NONE</span></code></li>
<li><code class="docutils literal notranslate"><span class="pre">THERMOSTAT_LANGEVIN</span></code></li>
<li><code class="docutils literal notranslate"><span class="pre">THERMOSTAT_NOSE_HOOVER</span></code></li>
<li><code class="docutils literal notranslate"><span class="pre">THERMOSTAT_NOSE_HOOVER_LANGEVIN</span></code></li>
<li><code class="docutils literal notranslate"><span class="pre">THERMOSTAT_LANGEVIN_NPT</span></code></li>
<li><code class="docutils literal notranslate"><span class="pre">THERMOSTAT_LANGEVIN_PR</span></code></li>
<li><code class="docutils literal notranslate"><span class="pre">THERMOSTAT_NPH_ANDERSEN</span></code></li>
<li><code class="docutils literal notranslate"><span class="pre">THERMOSTAT_NPH_PR</span></code></li>
<li><code class="docutils literal notranslate"><span class="pre">THERMOSTAT_LANGEVIN_OU</span></code></li>
<li><code class="docutils literal notranslate"><span class="pre">THERMOSTAT_LANGEVIN_NPT_NB</span></code></li>
</ul>
<p><code class="docutils literal notranslate"><span class="pre">T</span></code> is the target temperature. <code class="docutils literal notranslate"><span class="pre">Q</span></code> is the Nose-Hoover coupling constant. Only one
of <code class="docutils literal notranslate"><span class="pre">tau</span></code> or <code class="docutils literal notranslate"><span class="pre">gamma</span></code> should be given. <code class="docutils literal notranslate"><span class="pre">p</span></code> is the external
pressure for the case of Langevin NPT.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>type</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>t</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>gamma</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>q</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>tau</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>tau_cell</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>p</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>bulk_modulus_estimate</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>cell_oscillation_time</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>nhl_tau</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>nhl_mu</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>massive</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>region_i</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-0 array(int,’i’), optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">add_thermostat</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.add_thermostats">
<code class="descname">add_thermostats</code><span class="sig-paren">(</span><em>type</em>, <em>n</em><span class="optional">[</span>, <em>t</em>, <em>t_a</em>, <em>gamma</em>, <em>gamma_a</em>, <em>q</em>, <em>q_a</em>, <em>tau</em>, <em>tau_a</em>, <em>region_i</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.add_thermostats" title="Permalink to this definition">¶</a></dt>
<dd><p>ds_add_thermostats(type,n,[t,t_a,gamma,gamma_a,q,q_a,tau,tau_a,region_i])</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>type</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>n</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>t</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>t_a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘d’) with bounds (qp_n0), optional</span></dt>
<dd></dd>
<dt><strong>gamma</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>gamma_a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘d’) with bounds (qp_n1), optional</span></dt>
<dd></dd>
<dt><strong>q</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>q_a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘d’) with bounds (qp_n2), optional</span></dt>
<dd></dd>
<dt><strong>tau</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>tau_a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘d’) with bounds (qp_n3), optional</span></dt>
<dd></dd>
<dt><strong>region_i</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-0 array(int,’i’), optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">add_thermostats</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.advance_verlet">
<code class="descname">advance_verlet</code><span class="sig-paren">(</span><em>ds</em>, <em>dt</em>, <em>f</em><span class="optional">[</span>, <em>virial</em>, <em>e</em>, <em>parallel</em>, <em>store_constraint_force</em>, <em>do_calc_dists</em>, <em>error</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.advance_verlet" title="Permalink to this definition">¶</a></dt>
<dd><p>Calls`` advance_verlet2`` followed by <code class="docutils literal notranslate"><span class="pre">advance_verlet1</span></code>. Outside this routine the
velocities will be half-stepped. This allows a simpler MD loop:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">for</span> <span class="n">n</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">n_steps</span><span class="p">):</span>
    <span class="n">pot</span><span class="o">.</span><span class="n">calc</span><span class="p">(</span><span class="n">ds</span><span class="o">.</span><span class="n">atoms</span><span class="p">,</span> <span class="n">force</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">energy</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
    <span class="n">ds</span><span class="o">.</span><span class="n">advance_verlet</span><span class="p">(</span><span class="n">dt</span><span class="p">,</span> <span class="n">ds</span><span class="o">.</span><span class="n">atoms</span><span class="o">.</span><span class="n">force</span><span class="p">)</span>
    <span class="n">ds</span><span class="o">.</span><span class="n">print_status</span><span class="p">(</span><span class="n">epot</span><span class="o">=</span><span class="n">ds</span><span class="o">.</span><span class="n">atoms</span><span class="o">.</span><span class="n">energy</span><span class="p">)</span>
    <span class="k">if</span> <span class="n">n</span> <span class="o">%</span> <span class="n">connect_interval</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
       <span class="n">ds</span><span class="o">.</span><span class="n">atoms</span><span class="o">.</span><span class="n">calc_connect</span><span class="p">()</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>ds</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">dynamicalsystem</span></code> object</span></dt>
<dd></dd>
<dt><strong>dt</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>f</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-2 array(‘d’) with bounds (qp_n0,qp_n1)</span></dt>
<dd></dd>
<dt><strong>virial</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-2 array(‘d’) with bounds (3,3), optional</span></dt>
<dd></dd>
<dt><strong>e</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-0 array(float,’d’), optional</span></dt>
<dd></dd>
<dt><strong>parallel</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>store_constraint_force</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>do_calc_dists</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>error</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-0 array(int,’i’), optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">advance_verlet</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.advance_verlet1">
<code class="descname">advance_verlet1</code><span class="sig-paren">(</span><em>dt</em><span class="optional">[</span>, <em>virial</em>, <em>parallel</em>, <em>store_constraint_force</em>, <em>do_calc_dists</em>, <em>mpi_obj</em>, <em>error</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.advance_verlet1" title="Permalink to this definition">¶</a></dt>
<dd><p>Advance the velocities by half the time-step <code class="docutils literal notranslate"><span class="pre">dt</span></code> and the
positions by a full time-step. A typical MD loop should
resemble the following code (Python example, Fortran is similar):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ds</span><span class="o">.</span><span class="n">atoms</span><span class="o">.</span><span class="n">calc_connect</span><span class="p">()</span>
<span class="k">for</span> <span class="n">n</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">n_steps</span><span class="p">):</span>
   <span class="n">ds</span><span class="o">.</span><span class="n">advance_verlet1</span><span class="p">(</span><span class="n">dt</span><span class="p">)</span>
   <span class="n">pot</span><span class="o">.</span><span class="n">calc</span><span class="p">(</span><span class="n">ds</span><span class="o">.</span><span class="n">atoms</span><span class="p">,</span> <span class="n">force</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">energy</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
   <span class="n">ds</span><span class="o">.</span><span class="n">advance_verlet2</span><span class="p">(</span><span class="n">dt</span><span class="p">,</span> <span class="n">ds</span><span class="o">.</span><span class="n">atoms</span><span class="o">.</span><span class="n">force</span><span class="p">)</span>
   <span class="n">ds</span><span class="o">.</span><span class="n">print_status</span><span class="p">(</span><span class="n">epot</span><span class="o">=</span><span class="n">ds</span><span class="o">.</span><span class="n">atoms</span><span class="o">.</span><span class="n">energy</span><span class="p">)</span>
   <span class="k">if</span> <span class="n">n</span> <span class="o">%</span> <span class="n">connect_interval</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
      <span class="n">ds</span><span class="o">.</span><span class="n">atoms</span><span class="o">.</span><span class="n">calc_connect</span><span class="p">()</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>dt</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>virial</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-2 array(‘d’) with bounds (3,3), optional</span></dt>
<dd></dd>
<dt><strong>parallel</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>store_constraint_force</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>do_calc_dists</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>mpi_obj</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="mpi_context.html#quippy.mpi_context.MPI_context" title="quippy.mpi_context.MPI_context"><code class="xref py py-class docutils literal notranslate"><span class="pre">MPI_context</span></code></a> object, optional</span></dt>
<dd></dd>
<dt><strong>error</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-0 array(int,’i’), optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">advance_verlet1</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.advance_verlet2">
<code class="descname">advance_verlet2</code><span class="sig-paren">(</span><em>dt</em>, <em>f</em><span class="optional">[</span>, <em>virial</em>, <em>e</em>, <em>parallel</em>, <em>store_constraint_force</em>, <em>error</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.advance_verlet2" title="Permalink to this definition">¶</a></dt>
<dd><p>Advances the velocities by the second half time-step</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>dt</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>f</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-2 array(‘d’) with bounds (qp_n0,qp_n1)</span></dt>
<dd></dd>
<dt><strong>virial</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-2 array(‘d’) with bounds (3,3), optional</span></dt>
<dd></dd>
<dt><strong>e</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-0 array(float,’d’), optional</span></dt>
<dd></dd>
<dt><strong>parallel</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>store_constraint_force</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>error</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-0 array(int,’i’), optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">advance_verlet2</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.amend_constraint">
<code class="descname">amend_constraint</code><span class="sig-paren">(</span><em>constraint</em>, <em>func</em>, <em>data</em><span class="optional">[</span>, <em>k</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.amend_constraint" title="Permalink to this definition">¶</a></dt>
<dd><p>Replace a constraint involving some atoms with a different constraint involving
the same atoms</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>constraint</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>func</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>data</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘d’) with bounds (qp_n0)</span></dt>
<dd></dd>
<dt><strong>k</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">ds_amend_constraint</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.angular_momentum">
<code class="descname">angular_momentum</code><span class="sig-paren">(</span><span class="optional">[</span><em>origin</em>, <em>indices</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.angular_momentum" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the angular momentum of all the atoms in this DynamicalSystem, defined by
<span class="math notranslate nohighlight">\(\mathbf{L} = \sum_{i} \mathbf{r_i} \times \mathbf{v_i}\)</span>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>origin</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘d’) with bounds (3), optional</span></dt>
<dd></dd>
<dt><strong>indices</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘i’) with bounds (qp_n0), optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>ret_l</strong> <span class="classifier-delimiter">:</span> <span class="classifier">rank-1 array(‘d’) with bounds (3)</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">angular_momentum</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.constrain_atom_plane">
<code class="descname">constrain_atom_plane</code><span class="sig-paren">(</span><em>i</em>, <em>plane_n</em><span class="optional">[</span>, <em>d</em>, <em>restraint_k</em>, <em>bound</em>, <em>tol</em>, <em>print_summary</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.constrain_atom_plane" title="Permalink to this definition">¶</a></dt>
<dd><p>Constrain an atom to lie in a particluar plane</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>i</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>plane_n</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘d’) with bounds (3)</span></dt>
<dd></dd>
<dt><strong>d</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>restraint_k</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>bound</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>tol</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>print_summary</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">constrain_atom_plane</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.constrain_bondanglecos">
<code class="descname">constrain_bondanglecos</code><span class="sig-paren">(</span><em>i</em>, <em>j</em>, <em>k</em><span class="optional">[</span>, <em>c</em>, <em>restraint_k</em>, <em>bound</em>, <em>tol</em>, <em>print_summary</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.constrain_bondanglecos" title="Permalink to this definition">¶</a></dt>
<dd><p>Constrain the bond angle cosine between atoms i, j, and k</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>i</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>j</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>k</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>c</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>restraint_k</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>bound</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>tol</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>print_summary</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">constrain_bondanglecos</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.constrain_bondlength">
<code class="descname">constrain_bondlength</code><span class="sig-paren">(</span><em>i</em>, <em>j</em>, <em>d</em><span class="optional">[</span>, <em>di</em>, <em>t0</em>, <em>tau</em>, <em>restraint_k</em>, <em>bound</em>, <em>tol</em>, <em>print_summary</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.constrain_bondlength" title="Permalink to this definition">¶</a></dt>
<dd><p>Constrain the bond between atoms i and j</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>i</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>j</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>d</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>di</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>t0</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>tau</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>restraint_k</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>bound</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>tol</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>print_summary</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">constrain_bondlength</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.constrain_bondlength_dev_pow">
<code class="descname">constrain_bondlength_dev_pow</code><span class="sig-paren">(</span><em>i</em>, <em>j</em>, <em>p</em>, <em>d</em><span class="optional">[</span>, <em>di</em>, <em>t0</em>, <em>tau</em>, <em>restraint_k</em>, <em>bound</em>, <em>tol</em>, <em>print_summary</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.constrain_bondlength_dev_pow" title="Permalink to this definition">¶</a></dt>
<dd><p>Constrain the bond between atoms i and j</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>i</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>j</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>p</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>d</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>di</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>t0</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>tau</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>restraint_k</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>bound</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>tol</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>print_summary</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">constrain_bondlength_dev_pow</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.constrain_bondlength_diff">
<code class="descname">constrain_bondlength_diff</code><span class="sig-paren">(</span><em>i</em>, <em>j</em>, <em>k</em>, <em>d</em><span class="optional">[</span>, <em>di</em>, <em>t0</em>, <em>tau</em>, <em>restraint_k</em>, <em>bound</em>, <em>tol</em>, <em>print_summary</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.constrain_bondlength_diff" title="Permalink to this definition">¶</a></dt>
<dd><p>Constrain the difference of bond length between atoms i–j and j–k</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>i</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>j</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>k</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>d</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>di</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>t0</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>tau</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>restraint_k</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>bound</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>tol</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>print_summary</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">constrain_bondlength_diff</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.constrain_bondlength_sq">
<code class="descname">constrain_bondlength_sq</code><span class="sig-paren">(</span><em>i</em>, <em>j</em><span class="optional">[</span>, <em>d</em>, <em>restraint_k</em>, <em>bound</em>, <em>tol</em>, <em>print_summary</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.constrain_bondlength_sq" title="Permalink to this definition">¶</a></dt>
<dd><p>Constrain the bond between atoms i and j</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>i</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>j</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>d</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>restraint_k</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>bound</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>tol</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>print_summary</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">constrain_bondlength_sq</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.constrain_gap_energy">
<code class="descname">constrain_gap_energy</code><span class="sig-paren">(</span><em>d</em><span class="optional">[</span>, <em>restraint_k</em>, <em>bound</em>, <em>tol</em>, <em>print_summary</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.constrain_gap_energy" title="Permalink to this definition">¶</a></dt>
<dd><p>Constrain the energy gap of two resonance structures</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>d</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>restraint_k</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>bound</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>tol</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>print_summary</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">constrain_gap_energy</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.constrain_struct_factor_like_i">
<code class="descname">constrain_struct_factor_like_i</code><span class="sig-paren">(</span><em>z</em>, <em>q</em>, <em>sf</em><span class="optional">[</span>, <em>restraint_k</em>, <em>bound</em>, <em>tol</em>, <em>print_summary</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.constrain_struct_factor_like_i" title="Permalink to this definition">¶</a></dt>
<dd><p>Constrain an atom to lie in a particluar plane</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>z</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>q</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘d’) with bounds (3)</span></dt>
<dd></dd>
<dt><strong>sf</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>restraint_k</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>bound</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>tol</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>print_summary</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">constrain_struct_factor_like_i</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.constrain_struct_factor_like_mag">
<code class="descname">constrain_struct_factor_like_mag</code><span class="sig-paren">(</span><em>z</em>, <em>q</em>, <em>sf</em><span class="optional">[</span>, <em>restraint_k</em>, <em>bound</em>, <em>tol</em>, <em>print_summary</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.constrain_struct_factor_like_mag" title="Permalink to this definition">¶</a></dt>
<dd><p>Constrain an atom to lie in a particluar plane</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>z</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>q</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘d’) with bounds (3)</span></dt>
<dd></dd>
<dt><strong>sf</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>restraint_k</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>bound</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>tol</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>print_summary</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">constrain_struct_factor_like_mag</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.constrain_struct_factor_like_r">
<code class="descname">constrain_struct_factor_like_r</code><span class="sig-paren">(</span><em>z</em>, <em>q</em>, <em>sf</em><span class="optional">[</span>, <em>restraint_k</em>, <em>bound</em>, <em>tol</em>, <em>print_summary</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.constrain_struct_factor_like_r" title="Permalink to this definition">¶</a></dt>
<dd><p>Constrain an atom to lie in a particluar plane</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>z</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>q</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘d’) with bounds (3)</span></dt>
<dd></dd>
<dt><strong>sf</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>restraint_k</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>bound</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>tol</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>print_summary</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">constrain_struct_factor_like_r</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.disable_damping">
<code class="descname">disable_damping</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.disable_damping" title="Permalink to this definition">¶</a></dt>
<dd><p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">disable_damping</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.enable_damping">
<code class="descname">enable_damping</code><span class="sig-paren">(</span><em>damp_time</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.enable_damping" title="Permalink to this definition">¶</a></dt>
<dd><p>Enable damping, with damping time set to <cite>damp_time</cite>. Only atoms
flagged in the <cite>damp_mask</cite> property will be affected.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>damp_time</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">enable_damping</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.get_damping_time">
<code class="descname">get_damping_time</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.get_damping_time" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>ret_get_damping_time</strong> <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">get_damping_time</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.is_damping_enabled">
<code class="descname">is_damping_enabled</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.is_damping_enabled" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>ret_is_damping_enabled</strong> <span class="classifier-delimiter">:</span> <span class="classifier">int</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">is_damping_enabled</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.kinetic_energy">
<code class="descname">kinetic_energy</code><span class="sig-paren">(</span><span class="optional">[</span><em>mpi_obj</em>, <em>local_ke</em>, <em>error</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.kinetic_energy" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the total kinetic energy <span class="math notranslate nohighlight">\(E_k = \sum_{i} \frac{1}{2} m v^2\)</span></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>mpi_obj</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="mpi_context.html#quippy.mpi_context.MPI_context" title="quippy.mpi_context.MPI_context"><code class="xref py py-class docutils literal notranslate"><span class="pre">MPI_context</span></code></a> object, optional</span></dt>
<dd></dd>
<dt><strong>local_ke</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>error</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-0 array(int,’i’), optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>ret_ke</strong> <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">kinetic_energy</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.kinetic_virial">
<code class="descname">kinetic_virial</code><span class="sig-paren">(</span><span class="optional">[</span><em>mpi_obj</em>, <em>error</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.kinetic_virial" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the total kinetic virial <span class="math notranslate nohighlight">\(w_ij = \sum_{k} \frac{1}{2} m v_i v_j\)</span></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>mpi_obj</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="mpi_context.html#quippy.mpi_context.MPI_context" title="quippy.mpi_context.MPI_context"><code class="xref py py-class docutils literal notranslate"><span class="pre">MPI_context</span></code></a> object, optional</span></dt>
<dd></dd>
<dt><strong>error</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-0 array(int,’i’), optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>ret_kv</strong> <span class="classifier-delimiter">:</span> <span class="classifier">rank-2 array(‘d’) with bounds (3,3)</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">kinetic_virial</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.momentum">
<code class="descname">momentum</code><span class="sig-paren">(</span><span class="optional">[</span><em>indices</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.momentum" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the total momentum <span class="math notranslate nohighlight">\(\mathbf{p} = \sum_i \mathbf{m_i} \mathbf{v_i}\)</span>.
Optionally only include the contribution of a subset of atoms.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>indices</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘i’) with bounds (qp_n0), optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>ret_p</strong> <span class="classifier-delimiter">:</span> <span class="classifier">rank-1 array(‘d’) with bounds (3)</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">momentum</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.n_thermostat">
<code class="descname">n_thermostat</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.n_thermostat" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>ret_n_thermostat</strong> <span class="classifier-delimiter">:</span> <span class="classifier">int</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">n_thermostat</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.print_">
<code class="descname">print_</code><span class="sig-paren">(</span><span class="optional">[</span><em>file</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.print_" title="Permalink to this definition">¶</a></dt>
<dd><p>Print lots of information about this DynamicalSystem in text format.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>file</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="system.html#quippy.system.InOutput" title="quippy.system.InOutput"><code class="xref py py-class docutils literal notranslate"><span class="pre">InOutput</span></code></a> object, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">print_</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.print_status">
<code class="descname">print_status</code><span class="sig-paren">(</span><span class="optional">[</span><em>label</em>, <em>epot</em>, <em>instantaneous</em>, <em>mpi_obj</em>, <em>file</em>, <em>error</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.print_status" title="Permalink to this definition">¶</a></dt>
<dd><p>Print a status line showing the current time, temperature, the mean temperature
the total energy and the total momentum for this DynamicalSystem. If present, the optional
<code class="docutils literal notranslate"><span class="pre">label</span></code> parameter should be a one character label for the log lines and is printed
in the first column of the output. <code class="docutils literal notranslate"><span class="pre">epot</span></code> should be the potential energy
if this is available. <code class="docutils literal notranslate"><span class="pre">instantaneous</span></code> has the same meaning as in <code class="docutils literal notranslate"><span class="pre">temperature</span></code> routine.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>label</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input string(len=-1), optional</span></dt>
<dd></dd>
<dt><strong>epot</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>instantaneous</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>mpi_obj</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="mpi_context.html#quippy.mpi_context.MPI_context" title="quippy.mpi_context.MPI_context"><code class="xref py py-class docutils literal notranslate"><span class="pre">MPI_context</span></code></a> object, optional</span></dt>
<dd></dd>
<dt><strong>file</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="system.html#quippy.system.InOutput" title="quippy.system.InOutput"><code class="xref py py-class docutils literal notranslate"><span class="pre">InOutput</span></code></a> object, optional</span></dt>
<dd></dd>
<dt><strong>error</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-0 array(int,’i’), optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">ds_print_status</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.print_thermostats">
<code class="descname">print_thermostats</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.print_thermostats" title="Permalink to this definition">¶</a></dt>
<dd><p>ds_print_thermostats</p>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">print_thermostats</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.remove_atoms">
<code class="descname">remove_atoms</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.remove_atoms" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove one or more atoms from this DynamicalSystem. Equivalent of ‘Atoms%remove_atoms’,
but also amends the number of degrees of freedom correctly.</p>
<p>Wrapper around Fortran interface <code class="docutils literal notranslate"><span class="pre">remove_atoms</span></code> containing multiple routines:</p>
<blockquote>
<div><dl class="function">
<dt>
<code class="descname">remove_atoms</code><span class="sig-paren">(</span><em>i</em><span class="optional">[</span>, <em>error</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>i</strong> (<em>input int</em>) – </li>
<li><strong>error</strong> (<em>in/output rank-0 array</em><em>(</em><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><em>int</em></a><em>,</em><em>'i'</em><em>)</em><em>, </em><em>optional</em>) – </li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">ds_remove_atom_single</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt>
<code class="descname">remove_atoms</code><span class="sig-paren">(</span><em>atomlist_in</em><span class="optional">[</span>, <em>error</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>atomlist_in</strong> (<em>input rank-1 array</em><em>(</em><em>'i'</em><em>) </em><em>with bounds</em><em> (</em><em>qp_n0</em><em>)</em>) – </li>
<li><strong>error</strong> (<em>in/output rank-0 array</em><em>(</em><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><em>int</em></a><em>,</em><em>'i'</em><em>)</em><em>, </em><em>optional</em>) – </li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">ds_remove_atom_multiple</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

</div></blockquote>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.remove_thermostat">
<code class="descname">remove_thermostat</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.remove_thermostat" title="Permalink to this definition">¶</a></dt>
<dd><p>ds_remove_thermostat(index)</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>index</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">remove_thermostat</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.rescale_velo">
<code class="descname">rescale_velo</code><span class="sig-paren">(</span><em>temp</em><span class="optional">[</span>, <em>mass_weighted</em>, <em>zero_l</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.rescale_velo" title="Permalink to this definition">¶</a></dt>
<dd><p>Rescale the atomic velocities to temperature <code class="docutils literal notranslate"><span class="pre">temp</span></code>. If the
current temperature is zero, we first randomise the velocites.
If <code class="docutils literal notranslate"><span class="pre">mass_weighted</span></code> is true, then the velocites are weighted by
<span class="math notranslate nohighlight">\(1/sqrt{m}\)</span>. Linear momentum is zeroed automatically.  If
<code class="docutils literal notranslate"><span class="pre">zero_l</span></code> is true then the angular momentum is also zeroed.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>temp</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>mass_weighted</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>zero_l</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">rescale_velo</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.restore_state">
<code class="descname">restore_state</code><span class="sig-paren">(</span><em>to</em>, <em>from</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.restore_state" title="Permalink to this definition">¶</a></dt>
<dd><p>Restore a DynamicalSystem to a previously saved state.
Only scalar members and <code class="docutils literal notranslate"><span class="pre">ds.atoms</span></code> (minus <code class="docutils literal notranslate"><span class="pre">ds.atoms%connect</span></code>)
are copied back; <code class="docutils literal notranslate"><span class="pre">to</span></code> should be a properly initialised
DynamicalSystem object. The saved state of the random
number generator is also restored. <code class="docutils literal notranslate"><span class="pre">calc_dists()</span></code> is
called on the restored atoms object.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>to</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem" title="quippy.dynamicalsystem.DynamicalSystem"><code class="xref py py-class docutils literal notranslate"><span class="pre">DynamicalSystem</span></code></a> object</span></dt>
<dd></dd>
<dt><strong>from</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem" title="quippy.dynamicalsystem.DynamicalSystem"><code class="xref py py-class docutils literal notranslate"><span class="pre">DynamicalSystem</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">ds_restore_state</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.run">
<code class="descname">run</code><span class="sig-paren">(</span><em>pot</em>, <em>dt</em>, <em>n_steps</em>, <em>hook</em><span class="optional">[</span>, <em>hook_interval</em>, <em>summary_interval</em>, <em>write_interval</em>, <em>trajectory</em>, <em>args_str</em>, <em>error</em>, <em>hook_extra_args</em><span class="optional">]</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/dynamicalsystem.html#DynamicalSystem.run"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.run" title="Permalink to this definition">¶</a></dt>
<dd><p>Run <code class="docutils literal notranslate"><span class="pre">n_steps</span></code> of dynamics using forces from Potential <code class="docutils literal notranslate"><span class="pre">pot</span></code>.</p>
<p>For each step, forces are evaluated using the Potential
<code class="docutils literal notranslate"><span class="pre">pot</span></code> and the DynamicalSystem is advanced by a time <code class="docutils literal notranslate"><span class="pre">dt</span></code>
(default 1 fs).  <code class="docutils literal notranslate"><span class="pre">n_steps</span></code> (default 10 steps) are carried out in
total, with snapshots saved every <code class="docutils literal notranslate"><span class="pre">save_interval</span></code> steps. The
connectivity is recalculated every <code class="docutils literal notranslate"><span class="pre">connect_interval</span></code> steps.
<code class="docutils literal notranslate"><span class="pre">args_str</span></code> can be used to supply extra arguments to <code class="docutils literal notranslate"><span class="pre">Potential.calc</span></code>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>pot</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="potential.html#quippy.potential.Potential" title="quippy.potential.Potential"><code class="xref py py-class docutils literal notranslate"><span class="pre">Potential</span></code></a> object</span></dt>
<dd></dd>
<dt><strong>dt</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>n_steps</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>hook</strong> <span class="classifier-delimiter">:</span> <span class="classifier">call-back function</span></dt>
<dd></dd>
<dt><strong>hook_interval</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>summary_interval</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>write_interval</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>trajectory</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="io.html#quippy.cinoutput.CInOutput" title="quippy.cinoutput.CInOutput"><code class="xref py py-class docutils literal notranslate"><span class="pre">CInOutput</span></code></a> object, optional</span></dt>
<dd></dd>
<dt><strong>args_str</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input string(len=-1), optional</span></dt>
<dd></dd>
<dt><strong>error</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-0 array(int,’i’), optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">dynamicalsystem_run</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/Potentials/Potential.f95">src/Potentials/Potential.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.save_state">
<code class="descname">save_state</code><span class="sig-paren">(</span><em>to</em>, <em>from</em><span class="optional">[</span>, <em>error</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.save_state" title="Permalink to this definition">¶</a></dt>
<dd><p>Save the state of a DynamicalSystem. The output object
cannot be used as an initialised DynamicalSystem since
connectivity and group information is not copied to save
memory. Only scalar members and the <code class="docutils literal notranslate"><span class="pre">ds.atoms</span></code> object
(minus <code class="docutils literal notranslate"><span class="pre">ds.atoms%connect</span></code>) are copied. The current
state of the random number generator is also saved.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>to</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem" title="quippy.dynamicalsystem.DynamicalSystem"><code class="xref py py-class docutils literal notranslate"><span class="pre">DynamicalSystem</span></code></a> object</span></dt>
<dd></dd>
<dt><strong>from</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem" title="quippy.dynamicalsystem.DynamicalSystem"><code class="xref py py-class docutils literal notranslate"><span class="pre">DynamicalSystem</span></code></a> object</span></dt>
<dd></dd>
<dt><strong>error</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-0 array(int,’i’), optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">ds_save_state</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.set_barostat">
<code class="descname">set_barostat</code><span class="sig-paren">(</span><em>type</em>, <em>p_ext</em>, <em>hydrostatic_strain</em>, <em>diagonal_strain</em>, <em>finite_strain_formulation</em>, <em>tau_epsilon</em><span class="optional">[</span>, <em>w_epsilon</em>, <em>t</em>, <em>w_epsilon_factor</em>, <em>thermalise</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.set_barostat" title="Permalink to this definition">¶</a></dt>
<dd><p>ds_set_barostat(type,p_ext,hydrostatic_strain,diagonal_strain,finite_strain_formulation,tau_epsilon,[w_epsilon,t,w_epsilon_factor,thermalise])</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>type</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>p_ext</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>hydrostatic_strain</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>diagonal_strain</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>finite_strain_formulation</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>tau_epsilon</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>w_epsilon</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>t</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>w_epsilon_factor</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>thermalise</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">set_barostat</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.temperature">
<code class="descname">temperature</code><span class="sig-paren">(</span><span class="optional">[</span><em>property</em>, <em>value</em>, <em>include_all</em>, <em>instantaneous</em>, <em>mpi_obj</em>, <em>error</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.temperature" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the temperature, assuming each degree of freedom contributes
<span class="math notranslate nohighlight">\(\frac{1}{2}kT\)</span>. By default only moving and thermostatted atoms are
included — this can be overriden by setting <code class="docutils literal notranslate"><span class="pre">include_all</span></code> to true.
<code class="docutils literal notranslate"><span class="pre">region</span></code> can be used to restrict
the calculation to a particular thermostat
region. <code class="docutils literal notranslate"><span class="pre">instantaneous</span></code> controls whether the calculation should
be carried out using the current values of the velocities and
masses, or whether to return the value at the last Verlet step
(the latter is the default).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>property</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input string(len=-1), optional</span></dt>
<dd></dd>
<dt><strong>value</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>include_all</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>instantaneous</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>mpi_obj</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="mpi_context.html#quippy.mpi_context.MPI_context" title="quippy.mpi_context.MPI_context"><code class="xref py py-class docutils literal notranslate"><span class="pre">MPI_context</span></code></a> object, optional</span></dt>
<dd></dd>
<dt><strong>error</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-0 array(int,’i’), optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>ret_temperature</strong> <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">temperature</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.thermostat_temperatures">
<code class="descname">thermostat_temperatures</code><span class="sig-paren">(</span><em>n0</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.thermostat_temperatures" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>n0</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd><p class="first last">shape(qp_temps,0)</p>
</dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>temps</strong> <span class="classifier-delimiter">:</span> <span class="classifier">rank-1 array(‘d’) with bounds (qp_n0)</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">thermostat_temperatures</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.update_thermostat">
<code class="descname">update_thermostat</code><span class="sig-paren">(</span><span class="optional">[</span><em>t</em>, <em>p</em>, <em>i</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.update_thermostat" title="Permalink to this definition">¶</a></dt>
<dd><p>ds_update_thermostat([t,p,i])</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>t</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>p</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>i</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">update_thermostat</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.DynamicalSystem.zero_momentum">
<code class="descname">zero_momentum</code><span class="sig-paren">(</span><span class="optional">[</span><em>indices</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.zero_momentum" title="Permalink to this definition">¶</a></dt>
<dd><p>Change velocities to those that the system would have in the zero momentum frame.
Optionalally zero the total momentum of a subset of atoms, specified by <code class="docutils literal notranslate"><span class="pre">indices</span></code>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>indices</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘i’) with bounds (qp_n0), optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">zero_momentum</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.DynamicalSystem.avg_temp">
<code class="descname">avg_temp</code><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.avg_temp" title="Permalink to this definition">¶</a></dt>
<dd><p>Time-averaged temperature</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.DynamicalSystem.avg_time">
<code class="descname">avg_time</code><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.avg_time" title="Permalink to this definition">¶</a></dt>
<dd><p>Averaging time, in fs</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.DynamicalSystem.cur_temp">
<code class="descname">cur_temp</code><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.cur_temp" title="Permalink to this definition">¶</a></dt>
<dd><p>Current temperature</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.DynamicalSystem.dt">
<code class="descname">dt</code><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.dt" title="Permalink to this definition">¶</a></dt>
<dd><p>Last time step</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.DynamicalSystem.dw">
<code class="descname">dw</code><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.dw" title="Permalink to this definition">¶</a></dt>
<dd><p>Increment of work done this time step</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.DynamicalSystem.ekin">
<code class="descname">ekin</code><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.ekin" title="Permalink to this definition">¶</a></dt>
<dd><p>Current kinetic energy</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.DynamicalSystem.epot">
<code class="descname">epot</code><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.epot" title="Permalink to this definition">¶</a></dt>
<dd><p>Total potential energy</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.DynamicalSystem.ext_energy">
<code class="descname">ext_energy</code><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.ext_energy" title="Permalink to this definition">¶</a></dt>
<dd><p>Extended energy</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.DynamicalSystem.n">
<code class="descname">n</code><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.n" title="Permalink to this definition">¶</a></dt>
<dd><p>Number of atoms</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.DynamicalSystem.nconstraints">
<code class="descname">nconstraints</code><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.nconstraints" title="Permalink to this definition">¶</a></dt>
<dd><p>Number of constraints</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.DynamicalSystem.ndof">
<code class="descname">ndof</code><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.ndof" title="Permalink to this definition">¶</a></dt>
<dd><p>Number of degrees of freedom</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.DynamicalSystem.nrestraints">
<code class="descname">nrestraints</code><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.nrestraints" title="Permalink to this definition">¶</a></dt>
<dd><p>Number of restraints</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.DynamicalSystem.nrigid">
<code class="descname">nrigid</code><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.nrigid" title="Permalink to this definition">¶</a></dt>
<dd><p>Number of rigid bodies</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.DynamicalSystem.nsteps">
<code class="descname">nsteps</code><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.nsteps" title="Permalink to this definition">¶</a></dt>
<dd><p>Number of integration steps</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.DynamicalSystem.random_seed">
<code class="descname">random_seed</code><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.random_seed" title="Permalink to this definition">¶</a></dt>
<dd><p>RNG seed, used by <code class="docutils literal notranslate"><span class="pre">ds_save_state</span></code> and <code class="docutils literal notranslate"><span class="pre">ds_restore_state</span></code> only.</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.DynamicalSystem.t">
<code class="descname">t</code><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.t" title="Permalink to this definition">¶</a></dt>
<dd><p>Time</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.DynamicalSystem.thermostat_dw">
<code class="descname">thermostat_dw</code><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.thermostat_dw" title="Permalink to this definition">¶</a></dt>
<dd><p>Increment of work done by thermostat</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.DynamicalSystem.thermostat_work">
<code class="descname">thermostat_work</code><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.thermostat_work" title="Permalink to this definition">¶</a></dt>
<dd><p>Total work done by thermostat</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.DynamicalSystem.wkin">
<code class="descname">wkin</code><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.wkin" title="Permalink to this definition">¶</a></dt>
<dd><p>Current kinetic contribution to the virial</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.DynamicalSystem.work">
<code class="descname">work</code><a class="headerlink" href="#quippy.dynamicalsystem.DynamicalSystem.work" title="Permalink to this definition">¶</a></dt>
<dd><p>Total work done</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="quippy.dynamicalsystem.Dynamics">
<em class="property">class </em><code class="descclassname">quippy.dynamicalsystem.</code><code class="descname">Dynamics</code><span class="sig-paren">(</span><em>atoms</em>, <em>timestep</em>, <em>trajectory</em>, <em>trajectoryinterval=10</em>, <em>initialtemperature=None</em>, <em>logfile='-'</em>, <em>loginterval=1</em>, <em>loglabel='D'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/dynamicalsystem.html#Dynamics"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.dynamicalsystem.Dynamics" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#object" title="(in Python v2.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Wrapper around <a class="reference internal" href="#quippy.dynamicalsystem.DynamicalSystem" title="quippy.dynamicalsystem.DynamicalSystem"><code class="xref py py-class docutils literal notranslate"><span class="pre">DynamicalSystem</span></code></a> integrator compatible with
ASE <code class="xref py py-class docutils literal notranslate"><span class="pre">ase.md.MolecularDynamics</span></code> interface.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This class uses ASE units for time (and hence velocities
and momenta) which differ from the femtoseconds used in QUIP.
When using this class, all times should be given in ASE time units.</p>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>atoms</strong> – quippy or ASE Atoms instance. Note that if atoms is
not a quippy Atoms object, a copy will be made.</li>
<li><strong>timestep</strong> – in ASE time units (multiply by <code class="xref py py-const docutils literal notranslate"><span class="pre">ase.units.fs</span></code>
to convert from femtoseconds)</li>
<li><strong>trajectory</strong> – output file to which to write the trajectory.
Can be a string to create a new output object.</li>
<li><strong>trajectoryinterval</strong> – interval at which to write frames</li>
<li><strong>initialtemperature</strong> – if not <code class="docutils literal notranslate"><span class="pre">None</span></code>, rescale initial velocities
to a specified temperature, given in K.</li>
<li><strong>logfile</strong> – filename or open InOutput object to write log lines to.
Use special filename <code class="docutils literal notranslate"><span class="pre">&quot;-&quot;</span></code> for stdout (default).</li>
<li><strong>loginterval</strong> – interval at which to write log lines</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Attributes:</th><td class="field-body"><dl class="first last docutils">
<dt><a class="reference internal" href="#quippy.dynamicalsystem.Dynamics.average_temperature" title="quippy.dynamicalsystem.Dynamics.average_temperature"><code class="xref py py-obj docutils literal notranslate"><span class="pre">average_temperature</span></code></a></dt>
<dd><p class="first last">Average temperature</p>
</dd>
<dt><a class="reference internal" href="#quippy.dynamicalsystem.Dynamics.averaging_time" title="quippy.dynamicalsystem.Dynamics.averaging_time"><code class="xref py py-obj docutils literal notranslate"><span class="pre">averaging_time</span></code></a></dt>
<dd><p class="first last">Averaging time used for average temperature and kinetic energy</p>
</dd>
<dt><a class="reference internal" href="#quippy.dynamicalsystem.Dynamics.damping" title="quippy.dynamicalsystem.Dynamics.damping"><code class="xref py py-obj docutils literal notranslate"><span class="pre">damping</span></code></a></dt>
<dd><p class="first last">Get or set the damping time constant in fs.</p>
</dd>
<dt><a class="reference internal" href="#quippy.dynamicalsystem.Dynamics.number_of_constraints" title="quippy.dynamicalsystem.Dynamics.number_of_constraints"><code class="xref py py-obj docutils literal notranslate"><span class="pre">number_of_constraints</span></code></a></dt>
<dd><p class="first last">Get number of constraints</p>
</dd>
<dt><a class="reference internal" href="#quippy.dynamicalsystem.Dynamics.number_of_degrees_of_freedom" title="quippy.dynamicalsystem.Dynamics.number_of_degrees_of_freedom"><code class="xref py py-obj docutils literal notranslate"><span class="pre">number_of_degrees_of_freedom</span></code></a></dt>
<dd><p class="first last">Get number of degrees of freedom in system, including QUIP constraints</p>
</dd>
<dt><a class="reference internal" href="#quippy.dynamicalsystem.Dynamics.number_of_restraints" title="quippy.dynamicalsystem.Dynamics.number_of_restraints"><code class="xref py py-obj docutils literal notranslate"><span class="pre">number_of_restraints</span></code></a></dt>
<dd><p class="first last">Get number of restraints</p>
</dd>
<dt><a class="reference internal" href="#quippy.dynamicalsystem.Dynamics.number_of_rigid_bodies" title="quippy.dynamicalsystem.Dynamics.number_of_rigid_bodies"><code class="xref py py-obj docutils literal notranslate"><span class="pre">number_of_rigid_bodies</span></code></a></dt>
<dd><p class="first last">Get number of rigid_bodies</p>
</dd>
<dt><a class="reference internal" href="#quippy.dynamicalsystem.Dynamics.state" title="quippy.dynamicalsystem.Dynamics.state"><code class="xref py py-obj docutils literal notranslate"><span class="pre">state</span></code></a></dt>
<dd><p class="first last">Save or restore current state of this dynamical system</p>
</dd>
<dt><a class="reference internal" href="#quippy.dynamicalsystem.Dynamics.temperature" title="quippy.dynamicalsystem.Dynamics.temperature"><code class="xref py py-obj docutils literal notranslate"><span class="pre">temperature</span></code></a></dt>
<dd><p class="first last">Get or set the current temperature</p>
</dd>
<dt><a class="reference internal" href="#quippy.dynamicalsystem.Dynamics.time" title="quippy.dynamicalsystem.Dynamics.time"><code class="xref py py-obj docutils literal notranslate"><span class="pre">time</span></code></a></dt>
<dd><p class="first last">Time in ASE units (Note: NOT the same as femtoseconds)</p>
</dd>
<dt><a class="reference internal" href="#quippy.dynamicalsystem.Dynamics.timestep" title="quippy.dynamicalsystem.Dynamics.timestep"><code class="xref py py-obj docutils literal notranslate"><span class="pre">timestep</span></code></a></dt>
<dd><p class="first last">Set timestep, in ASE time units</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Methods</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.Dynamics.add_thermostat" title="quippy.dynamicalsystem.Dynamics.add_thermostat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">add_thermostat</span></code></a>(type,&nbsp;T[,&nbsp;gamma,&nbsp;Q,&nbsp;tau,&nbsp;…])</td>
<td>Add a new thermostat to this Dynamics, and return its index.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.Dynamics.attach" title="quippy.dynamicalsystem.Dynamics.attach"><code class="xref py py-obj docutils literal notranslate"><span class="pre">attach</span></code></a>(function[,&nbsp;interval])</td>
<td>Attach callback function.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.Dynamics.get_number_of_thermostats" title="quippy.dynamicalsystem.Dynamics.get_number_of_thermostats"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_number_of_thermostats</span></code></a>()</td>
<td>Return the number of active thermostats</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.Dynamics.get_thermostat_temperatures" title="quippy.dynamicalsystem.Dynamics.get_thermostat_temperatures"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_thermostat_temperatures</span></code></a>()</td>
<td>Return the current temperatures of all thermostated regions</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.Dynamics.insert_observer" title="quippy.dynamicalsystem.Dynamics.insert_observer"><code class="xref py py-obj docutils literal notranslate"><span class="pre">insert_observer</span></code></a>(function[,&nbsp;position,&nbsp;interval])</td>
<td>Insert an observer.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.Dynamics.print_thermostats" title="quippy.dynamicalsystem.Dynamics.print_thermostats"><code class="xref py py-obj docutils literal notranslate"><span class="pre">print_thermostats</span></code></a>()</td>
<td>Print a table of the current thermostats in this system</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.Dynamics.remove_thermostat" title="quippy.dynamicalsystem.Dynamics.remove_thermostat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">remove_thermostat</span></code></a>(index)</td>
<td>Remove thermostat number <cite>index</cite>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.Dynamics.run" title="quippy.dynamicalsystem.Dynamics.run"><code class="xref py py-obj docutils literal notranslate"><span class="pre">run</span></code></a>([steps])</td>
<td>Run dynamics forwards for <cite>steps</cite> steps.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.Dynamics.set_barostat" title="quippy.dynamicalsystem.Dynamics.set_barostat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">set_barostat</span></code></a>(type,&nbsp;p_ext,&nbsp;…[,&nbsp;W_epsilon,&nbsp;…])</td>
<td>Add a barostat to this dynamical system</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.Dynamics.set_temperature" title="quippy.dynamicalsystem.Dynamics.set_temperature"><code class="xref py py-obj docutils literal notranslate"><span class="pre">set_temperature</span></code></a>(temperature)</td>
<td>Randomise velocities to a target temperature (given in K)</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.Dynamics.step" title="quippy.dynamicalsystem.Dynamics.step"><code class="xref py py-obj docutils literal notranslate"><span class="pre">step</span></code></a>(forces)</td>
<td>Advance dynamics by one time-step.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.dynamicalsystem.Dynamics.update_barostat" title="quippy.dynamicalsystem.Dynamics.update_barostat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">update_barostat</span></code></a>(p,&nbsp;T)</td>
<td>Update target pressure <cite>p</cite> or temperature <cite>T</cite> for NPT barostat</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.dynamicalsystem.Dynamics.update_thermostat" title="quippy.dynamicalsystem.Dynamics.update_thermostat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">update_thermostat</span></code></a>([T,&nbsp;p,&nbsp;index])</td>
<td>Change the target temperature <cite>T</cite> or presure <cite>p</cite> for thermostat <cite>index</cite>.</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="quippy.dynamicalsystem.Dynamics.add_thermostat">
<code class="descname">add_thermostat</code><span class="sig-paren">(</span><em>type</em>, <em>T</em>, <em>gamma=None</em>, <em>Q=None</em>, <em>tau=None</em>, <em>tau_cell=None</em>, <em>p=None</em>, <em>NHL_tau=None</em>, <em>NHL_mu=None</em>, <em>massive=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/dynamicalsystem.html#Dynamics.add_thermostat"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.dynamicalsystem.Dynamics.add_thermostat" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a new thermostat to this Dynamics, and return its index.</p>
<p>By default, all thermostats apply to the whole system. The
‘thermostat_region’ property can be used to control which
thermostats affect which atoms. It should be set to the index
of the required thermostat for each atom.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>type</strong> – string or integer giving thermostat type. The following types are supported::
<code class="docutils literal notranslate"><span class="pre">THERMOSTAT_NONE</span></code>, <code class="docutils literal notranslate"><span class="pre">THERMOSTAT_LANGEVIN</span></code>, <code class="docutils literal notranslate"><span class="pre">THERMOSTAT_NOSE_HOOVER</span></code>, <code class="docutils literal notranslate"><span class="pre">THERMOSTAT_NOSE_HOOVER_LANGEVIN</span></code>,
<code class="docutils literal notranslate"><span class="pre">THERMOSTAT_LANGEVIN_NPT</span></code>, <code class="docutils literal notranslate"><span class="pre">THERMOSTAT_LANGEVIN_PR</span></code>, <code class="docutils literal notranslate"><span class="pre">THERMOSTAT_NPH_ANDERSEN</span></code>, <code class="docutils literal notranslate"><span class="pre">THERMOSTAT_NPH_PR</span></code>,
<code class="docutils literal notranslate"><span class="pre">THERMOSTAT_LANGEVIN_OU</span></code>, <code class="docutils literal notranslate"><span class="pre">THERMOSTAT_LANGEVIN_NPT_NB</span></code>, <code class="docutils literal notranslate"><span class="pre">THERMOSTAT_ALL_PURPOSE</span></code>.</li>
<li><strong>T</strong> – target temperature for this thermostat, in K.</li>
<li><strong>gamma</strong> – decay constant, in units  of 1/fs</li>
<li><strong>tau</strong> – time constant, in units of fs. tau == 1/gamma, and
only one of the two should be specified.</li>
<li><strong>tau_cell</strong> – time constant for the cell degrees of freedom
(for variable cell thermostats only).</li>
<li><strong>p</strong> – target pressure (for variable cell thermostats)</li>
<li><strong>NHL_tau</strong> – time constant for Nose-Hoover-Langevein thermostats</li>
<li><strong>NHL_mu</strong> – thermostat mass Nose-Hoover-Langevin thermostats</li>
<li><strong>massive</strong> – set to True to enable massive Nose-Hoover-Langevin</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.Dynamics.attach">
<code class="descname">attach</code><span class="sig-paren">(</span><em>function</em>, <em>interval=1</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/dynamicalsystem.html#Dynamics.attach"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.dynamicalsystem.Dynamics.attach" title="Permalink to this definition">¶</a></dt>
<dd><p>Attach callback function.</p>
<p>At every <em>interval</em> steps, call <em>function</em> with arguments
<em>args</em> and keyword arguments <em>kwargs</em>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.Dynamics.get_number_of_thermostats">
<code class="descname">get_number_of_thermostats</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/dynamicalsystem.html#Dynamics.get_number_of_thermostats"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.dynamicalsystem.Dynamics.get_number_of_thermostats" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the number of active thermostats</p>
<p>Excludes thermostat with index zero, which is used for damping.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.Dynamics.get_thermostat_temperatures">
<code class="descname">get_thermostat_temperatures</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/dynamicalsystem.html#Dynamics.get_thermostat_temperatures"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.dynamicalsystem.Dynamics.get_thermostat_temperatures" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the current temperatures of all thermostated regions</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.Dynamics.insert_observer">
<code class="descname">insert_observer</code><span class="sig-paren">(</span><em>function</em>, <em>position=0</em>, <em>interval=1</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/dynamicalsystem.html#Dynamics.insert_observer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.dynamicalsystem.Dynamics.insert_observer" title="Permalink to this definition">¶</a></dt>
<dd><p>Insert an observer.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.Dynamics.print_thermostats">
<code class="descname">print_thermostats</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/dynamicalsystem.html#Dynamics.print_thermostats"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.dynamicalsystem.Dynamics.print_thermostats" title="Permalink to this definition">¶</a></dt>
<dd><p>Print a table of the current thermostats in this system</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.Dynamics.remove_thermostat">
<code class="descname">remove_thermostat</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/dynamicalsystem.html#Dynamics.remove_thermostat"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.dynamicalsystem.Dynamics.remove_thermostat" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove thermostat number <cite>index</cite>.</p>
<p><cite>index</cite> should be in range 1 &lt;= index &lt;= dyn.get_number_of_thermostats()</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.Dynamics.run">
<code class="descname">run</code><span class="sig-paren">(</span><em>steps=50</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/dynamicalsystem.html#Dynamics.run"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.dynamicalsystem.Dynamics.run" title="Permalink to this definition">¶</a></dt>
<dd><p>Run dynamics forwards for <cite>steps</cite> steps.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.Dynamics.set_barostat">
<code class="descname">set_barostat</code><span class="sig-paren">(</span><em>type</em>, <em>p_ext</em>, <em>hydrostatic_strain</em>, <em>diagonal_strain</em>, <em>finite_strain_formulation</em>, <em>tau_epsilon</em>, <em>W_epsilon=None</em>, <em>T=None</em>, <em>W_epsilon_factor=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/dynamicalsystem.html#Dynamics.set_barostat"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.dynamicalsystem.Dynamics.set_barostat" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a barostat to this dynamical system</p>
<p>Langevin NPT barostat based on fluctuation/dissipation, as
originally implemented for hydrostatic strain using
EOM from Quigley, D. and Probert, M.I.J., J. Chem. Phys.
120 11432, subsequently rediscretized by Noam Bernstein
based on ideas from and discussion with B. Leimkuhler.</p>
<p>Modified for arbitrary strain based on (but not exactly using)
formulation in E. Tadmor and R. Miller Modeling Materials:
Continuum, Atomistic and Multiscale Techniques
(Cambridge University Press, 2011). Chap 9.5.  Their
definition of stress (factors of F, F^T, J, and F^-T) for finite
strain is optionally used, but certain terms in EOM are excluded,
and their discretization is entirely ignored.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>type</strong> – The type of barostat to be used. Currently only
<code class="docutils literal notranslate"><span class="pre">BAROSTAT_HOOVER_LANGEVIN</span></code> is supported.</li>
<li><strong>p_ext</strong> – External pressure in QUIP units eV/A^3</li>
<li><strong>hystrostatic_strain</strong> – Set to True to constrain a
hydrostatic strain tensor</li>
<li><strong>diagonal_strain</strong> – Set to True to constrain a
diagonal strain tensor</li>
<li><strong>finite_strain_formulation</strong> – If True, use finite instead of
infinitessimal strain formulation</li>
<li><strong>tau_epsilon</strong> – time constant for Langevin part (in fs)</li>
<li><strong>W_epsilon</strong> – fictious cell mass used in Langevin NPT</li>
<li><strong>T</strong> – target temperature for Langevin part</li>
<li><strong>W_epsilon_factor</strong> – Scaling factor for fictious cell mass</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.Dynamics.set_temperature">
<code class="descname">set_temperature</code><span class="sig-paren">(</span><em>temperature</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/dynamicalsystem.html#Dynamics.set_temperature"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.dynamicalsystem.Dynamics.set_temperature" title="Permalink to this definition">¶</a></dt>
<dd><p>Randomise velocities to a target temperature (given in K)</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.Dynamics.step">
<code class="descname">step</code><span class="sig-paren">(</span><em>forces</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/dynamicalsystem.html#Dynamics.step"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.dynamicalsystem.Dynamics.step" title="Permalink to this definition">¶</a></dt>
<dd><p>Advance dynamics by one time-step.</p>
<p>Returns forces at the end of the time-step, suitable for passing to next step()</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.Dynamics.update_barostat">
<code class="descname">update_barostat</code><span class="sig-paren">(</span><em>p</em>, <em>T</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/dynamicalsystem.html#Dynamics.update_barostat"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.dynamicalsystem.Dynamics.update_barostat" title="Permalink to this definition">¶</a></dt>
<dd><p>Update target pressure <cite>p</cite> or temperature <cite>T</cite> for NPT barostat</p>
</dd></dl>

<dl class="method">
<dt id="quippy.dynamicalsystem.Dynamics.update_thermostat">
<code class="descname">update_thermostat</code><span class="sig-paren">(</span><em>T=None</em>, <em>p=None</em>, <em>index=1</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/dynamicalsystem.html#Dynamics.update_thermostat"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.dynamicalsystem.Dynamics.update_thermostat" title="Permalink to this definition">¶</a></dt>
<dd><p>Change the target temperature <cite>T</cite> or presure <cite>p</cite> for thermostat <cite>index</cite>.</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.Dynamics.average_temperature">
<code class="descname">average_temperature</code><a class="headerlink" href="#quippy.dynamicalsystem.Dynamics.average_temperature" title="Permalink to this definition">¶</a></dt>
<dd><p>Average temperature</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.Dynamics.averaging_time">
<code class="descname">averaging_time</code><a class="headerlink" href="#quippy.dynamicalsystem.Dynamics.averaging_time" title="Permalink to this definition">¶</a></dt>
<dd><p>Averaging time used for average temperature and kinetic energy</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.Dynamics.damping">
<code class="descname">damping</code><a class="headerlink" href="#quippy.dynamicalsystem.Dynamics.damping" title="Permalink to this definition">¶</a></dt>
<dd><p>Get or set the damping time constant in fs. Set to
None to disable damping.  By default damping applies
to all atoms, but can be selectively enabled with the
‘damp_mask’ property.</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.Dynamics.number_of_constraints">
<code class="descname">number_of_constraints</code><a class="headerlink" href="#quippy.dynamicalsystem.Dynamics.number_of_constraints" title="Permalink to this definition">¶</a></dt>
<dd><p>Get number of constraints</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.Dynamics.number_of_degrees_of_freedom">
<code class="descname">number_of_degrees_of_freedom</code><a class="headerlink" href="#quippy.dynamicalsystem.Dynamics.number_of_degrees_of_freedom" title="Permalink to this definition">¶</a></dt>
<dd><p>Get number of degrees of freedom in system, including QUIP constraints</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.Dynamics.number_of_restraints">
<code class="descname">number_of_restraints</code><a class="headerlink" href="#quippy.dynamicalsystem.Dynamics.number_of_restraints" title="Permalink to this definition">¶</a></dt>
<dd><p>Get number of restraints</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.Dynamics.number_of_rigid_bodies">
<code class="descname">number_of_rigid_bodies</code><a class="headerlink" href="#quippy.dynamicalsystem.Dynamics.number_of_rigid_bodies" title="Permalink to this definition">¶</a></dt>
<dd><p>Get number of rigid_bodies</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.Dynamics.state">
<code class="descname">state</code><a class="headerlink" href="#quippy.dynamicalsystem.Dynamics.state" title="Permalink to this definition">¶</a></dt>
<dd><p>Save or restore current state of this dynamical system</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.Dynamics.temperature">
<code class="descname">temperature</code><a class="headerlink" href="#quippy.dynamicalsystem.Dynamics.temperature" title="Permalink to this definition">¶</a></dt>
<dd><p>Get or set the current temperature</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.Dynamics.time">
<code class="descname">time</code><a class="headerlink" href="#quippy.dynamicalsystem.Dynamics.time" title="Permalink to this definition">¶</a></dt>
<dd><p>Time in ASE units (Note: NOT the same as femtoseconds)</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.dynamicalsystem.Dynamics.timestep">
<code class="descname">timestep</code><a class="headerlink" href="#quippy.dynamicalsystem.Dynamics.timestep" title="Permalink to this definition">¶</a></dt>
<dd><p>Set timestep, in ASE time units</p>
</dd></dl>

</dd></dl>

<dl class="function">
<dt id="quippy.dynamicalsystem.gaussian_velocity_component">
<code class="descclassname">quippy.dynamicalsystem.</code><code class="descname">gaussian_velocity_component</code><span class="sig-paren">(</span><em>m</em>, <em>t</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.gaussian_velocity_component" title="Permalink to this definition">¶</a></dt>
<dd><p>Draw a velocity component from the correct Gaussian distribution for
a degree of freedom with (effective) mass <code class="docutils literal notranslate"><span class="pre">m</span></code> at temperature <code class="docutils literal notranslate"><span class="pre">T</span></code></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>m</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>t</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>ret_v</strong> <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">gaussian_velocity_component</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.dynamicalsystem.torque">
<code class="descclassname">quippy.dynamicalsystem.</code><code class="descname">torque</code><span class="sig-paren">(</span><em>pos</em>, <em>force</em><span class="optional">[</span>, <em>origin</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.torque" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>pos</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-2 array(‘d’) with bounds (qp_n0,qp_n1)</span></dt>
<dd></dd>
<dt><strong>force</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-2 array(‘d’) with bounds (qp_n2,qp_n3)</span></dt>
<dd></dd>
<dt><strong>origin</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘d’) with bounds (3), optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>ret_tau</strong> <span class="classifier-delimiter">:</span> <span class="classifier">rank-1 array(‘d’) with bounds (3)</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">torque</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.dynamicalsystem.distance_relative_velocity">
<code class="descclassname">quippy.dynamicalsystem.</code><code class="descname">distance_relative_velocity</code><span class="sig-paren">(</span><em>at</em>, <em>i</em>, <em>j</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.distance_relative_velocity" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the distance between two atoms and the relative velocity
between them projected along the bond direction.
This is useful for time dependent constraints.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>at</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
<dt><strong>i</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>j</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>dist</strong> <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd></dd>
<dt><strong>rel_velo</strong> <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">distance_relative_velocity</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.dynamicalsystem.angular_momentum">
<code class="descclassname">quippy.dynamicalsystem.</code><code class="descname">angular_momentum</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.angular_momentum" title="Permalink to this definition">¶</a></dt>
<dd><p>Routine is wrapper around Fortran interface <code class="docutils literal notranslate"><span class="pre">angular_momentum</span></code> containing multiple routines:</p>
<blockquote>
<div><dl class="function">
<dt>
<code class="descclassname">quippy.dynamicalsystem.</code><code class="descname">angular_momentum</code><span class="sig-paren">(</span><em>mass</em>, <em>pos</em>, <em>velo</em><span class="optional">[</span>, <em>origin</em>, <em>indices</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
<dd><p>Return the angular momentum of all the atoms in this DynamicalSystem, defined by
<span class="math notranslate nohighlight">\(\mathbf{L} = \sum_{i} \mathbf{r_i} \times \mathbf{v_i}\)</span>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>mass</strong> (<em>input rank-1 array</em><em>(</em><em>'d'</em><em>) </em><em>with bounds</em><em> (</em><em>qp_n0</em><em>)</em>) – </li>
<li><strong>pos</strong> (<em>input rank-2 array</em><em>(</em><em>'d'</em><em>) </em><em>with bounds</em><em> (</em><em>qp_n1</em><em>,</em><em>qp_n2</em><em>)</em>) – </li>
<li><strong>velo</strong> (<em>input rank-2 array</em><em>(</em><em>'d'</em><em>) </em><em>with bounds</em><em> (</em><em>qp_n3</em><em>,</em><em>qp_n4</em><em>)</em>) – </li>
<li><strong>origin</strong> (<em>input rank-1 array</em><em>(</em><em>'d'</em><em>) </em><em>with bounds</em><em> (</em><em>3</em><em>)</em><em>, </em><em>optional</em>) – </li>
<li><strong>indices</strong> (<em>input rank-1 array</em><em>(</em><em>'i'</em><em>) </em><em>with bounds</em><em> (</em><em>qp_n5</em><em>)</em><em>, </em><em>optional</em>) – </li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><strong>ret_l</strong> –  rank-1 array(‘d’) with bounds (3)</p>
</td>
</tr>
</tbody>
</table>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">arrays_angular_momentum</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

</div></blockquote>
</dd></dl>

<dl class="function">
<dt id="quippy.dynamicalsystem.kinetic_virial">
<code class="descclassname">quippy.dynamicalsystem.</code><code class="descname">kinetic_virial</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.kinetic_virial" title="Permalink to this definition">¶</a></dt>
<dd><p>Routine is wrapper around Fortran interface <code class="docutils literal notranslate"><span class="pre">kinetic_virial</span></code> containing multiple routines:</p>
<blockquote>
<div><dl class="function">
<dt>
<code class="descclassname">quippy.dynamicalsystem.</code><code class="descname">kinetic_virial</code><span class="sig-paren">(</span><em>mass</em>, <em>velo</em><span class="sig-paren">)</span></dt>
<dd><p>Return the total kinetic virial given atomic masses and velocities</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>mass</strong> (<em>input rank-1 array</em><em>(</em><em>'d'</em><em>) </em><em>with bounds</em><em> (</em><em>qp_n0</em><em>)</em>) – </li>
<li><strong>velo</strong> (<em>input rank-2 array</em><em>(</em><em>'d'</em><em>) </em><em>with bounds</em><em> (</em><em>qp_n1</em><em>,</em><em>qp_n2</em><em>)</em>) – </li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><strong>ret_kv</strong> –  rank-2 array(‘d’) with bounds (3,3)</p>
</td>
</tr>
</tbody>
</table>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">arrays_kinetic_virial</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt>
<code class="descclassname">quippy.dynamicalsystem.</code><code class="descname">kinetic_virial</code><span class="sig-paren">(</span><em>mass</em>, <em>velo</em><span class="sig-paren">)</span></dt>
<dd><p>Return the kinetic virial given a mass and a velocity</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>mass</strong> (<em>input float</em>) – </li>
<li><strong>velo</strong> (<em>input rank-1 array</em><em>(</em><em>'d'</em><em>) </em><em>with bounds</em><em> (</em><em>3</em><em>)</em>) – </li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><strong>ret_kv</strong> –  rank-2 array(‘d’) with bounds (3,3)</p>
</td>
</tr>
</tbody>
</table>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">single_kinetic_virial</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

</div></blockquote>
</dd></dl>

<dl class="function">
<dt id="quippy.dynamicalsystem.momentum">
<code class="descclassname">quippy.dynamicalsystem.</code><code class="descname">momentum</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.momentum" title="Permalink to this definition">¶</a></dt>
<dd><p>Routine is wrapper around Fortran interface <code class="docutils literal notranslate"><span class="pre">momentum</span></code> containing multiple routines:</p>
<blockquote>
<div><dl class="function">
<dt>
<code class="descclassname">quippy.dynamicalsystem.</code><code class="descname">momentum</code><span class="sig-paren">(</span><em>mass</em>, <em>velo</em><span class="optional">[</span>, <em>indices</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
<dd><p>Return the total momentum <span class="math notranslate nohighlight">\(\mathbf{p} = \sum_i \mathbf{m_i} \mathbf{v_i}\)</span>.
Optionally only include the contribution of a subset of atoms.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>mass</strong> (<em>input rank-1 array</em><em>(</em><em>'d'</em><em>) </em><em>with bounds</em><em> (</em><em>qp_n0</em><em>)</em>) – </li>
<li><strong>velo</strong> (<em>input rank-2 array</em><em>(</em><em>'d'</em><em>) </em><em>with bounds</em><em> (</em><em>qp_n1</em><em>,</em><em>qp_n2</em><em>)</em>) – </li>
<li><strong>indices</strong> (<em>input rank-1 array</em><em>(</em><em>'i'</em><em>) </em><em>with bounds</em><em> (</em><em>qp_n3</em><em>)</em><em>, </em><em>optional</em>) – </li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><strong>ret_p</strong> –  rank-1 array(‘d’) with bounds (3)</p>
</td>
</tr>
</tbody>
</table>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">arrays_momentum</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

</div></blockquote>
</dd></dl>

<dl class="function">
<dt id="quippy.dynamicalsystem.kinetic_energy">
<code class="descclassname">quippy.dynamicalsystem.</code><code class="descname">kinetic_energy</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.dynamicalsystem.kinetic_energy" title="Permalink to this definition">¶</a></dt>
<dd><p>Routine is wrapper around Fortran interface <code class="docutils literal notranslate"><span class="pre">kinetic_energy</span></code> containing multiple routines:</p>
<blockquote>
<div><dl class="function">
<dt>
<code class="descclassname">quippy.dynamicalsystem.</code><code class="descname">kinetic_energy</code><span class="sig-paren">(</span><em>mass</em>, <em>velo</em><span class="optional">[</span>, <em>local_ke</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
<dd><p>Return the total kinetic energy given atomic masses and velocities</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>mass</strong> (<em>input rank-1 array</em><em>(</em><em>'d'</em><em>) </em><em>with bounds</em><em> (</em><em>qp_n0</em><em>)</em>) – </li>
<li><strong>velo</strong> (<em>input rank-2 array</em><em>(</em><em>'d'</em><em>) </em><em>with bounds</em><em> (</em><em>qp_n1</em><em>,</em><em>qp_n2</em><em>)</em>) – </li>
<li><strong>local_ke</strong> (<em>in/output rank-1 array</em><em>(</em><em>'d'</em><em>) </em><em>with bounds</em><em> (</em><em>qp_n3</em><em>)</em><em>, </em><em>optional</em>) – </li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><strong>ret_ke</strong> –  float</p>
</td>
</tr>
</tbody>
</table>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">arrays_kinetic_energy</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt>
<code class="descclassname">quippy.dynamicalsystem.</code><code class="descname">kinetic_energy</code><span class="sig-paren">(</span><em>mass</em>, <em>velo</em><span class="sig-paren">)</span></dt>
<dd><p>Return the kinetic energy given a mass and a velocity</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>mass</strong> (<em>input float</em>) – </li>
<li><strong>velo</strong> (<em>input rank-1 array</em><em>(</em><em>'d'</em><em>) </em><em>with bounds</em><em> (</em><em>3</em><em>)</em>) – </li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><strong>ret_ke</strong> –  float</p>
</td>
</tr>
</tbody>
</table>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">single_kinetic_energy</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/DynamicalSystem.f95">src/libAtoms/DynamicalSystem.f95</a>.</p>
</dd></dl>

</div></blockquote>
</dd></dl>

</div>


           </div>
           
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
      
        <a href="topology.html" class="btn btn-neutral float-left" title="Some utilities for topological analysis" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2008-2016, James Kermode

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>